for the given target
*/
-exports.getSystem = function (target) {
+exports.getSystem = function(target) {
const existingLinks = linksForTarget.get(target);
if (existingLinks != null) {
existingLinks.refs++;
@@ -163,7 +163,7 @@
* Someone that called getSystem doesn't need it any more, so decrement the
* count of users of the system for that target, and destroy if needed
*/
-exports.releaseSystem = function (target) {
+exports.releaseSystem = function(target) {
const links = linksForTarget.get(target);
if (links == null) {
throw new Error("releaseSystem called for unknown target");
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/jsb.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/jsb.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/jsb.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/jsb.js 2018-03-14 13:35:19.000000000 +0000
@@ -89,7 +89,7 @@
]
}
],
- exec: function (args, context) {
+ exec: function(args, context) {
/* eslint-disable camelcase */
let opts = {
indent_size: args.indentSize,
@@ -107,7 +107,7 @@
let deferred = context.defer();
- xhr.onreadystatechange = function () {
+ xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200 || xhr.status == 0) {
let result = beautify.js(xhr.responseText, opts);
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/listen.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/listen.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/listen.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/listen.js 2018-03-14 13:35:19.000000000 +0000
@@ -65,7 +65,7 @@
description: l10n.lookup("listenProtocolDesc"),
},
],
- exec: function (args, context) {
+ exec: function(args, context) {
let listener = debuggerServer.createListener();
if (!listener) {
throw new Error(l10n.lookup("listenDisabledOutput"));
@@ -95,7 +95,7 @@
name: "unlisten",
description: l10n.lookup("unlistenDesc"),
manual: l10n.lookup("unlistenManual"),
- exec: function (args, context) {
+ exec: function(args, context) {
debuggerServer.closeAllListeners();
return l10n.lookup("unlistenOutput");
}
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/measure.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/measure.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/measure.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/measure.js 2018-03-14 13:35:19.000000000 +0000
@@ -62,7 +62,7 @@
runAt: "server",
hidden: true,
returnType: "highlighterVisibility",
- exec: function (args, context) {
+ exec: function(args, context) {
let env = context.environment;
let { document } = env;
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/media.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/media.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/media.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/media.js 2018-03-14 13:35:19.000000000 +0000
@@ -38,7 +38,7 @@
}
}
],
- exec: function (args, context) {
+ exec: function(args, context) {
let contentViewer = getContentViewer(context);
contentViewer.emulateMedium(args.type);
}
@@ -48,7 +48,7 @@
runAt: "server",
name: "media reset",
description: l10n.lookup("mediaResetDesc"),
- exec: function (args, context) {
+ exec: function(args, context) {
let contentViewer = getContentViewer(context);
contentViewer.stopEmulatingMedium();
}
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/pagemod.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/pagemod.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/pagemod.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/pagemod.js 2018-03-14 13:35:19.000000000 +0000
@@ -63,10 +63,10 @@
},
],
// Make a given string safe to use in a regular expression.
- escapeRegex: function (string) {
+ escapeRegex: function(string) {
return string.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
},
- exec: function (args, context) {
+ exec: function(args, context) {
let searchTextNodes = !args.attrOnly;
let searchAttributes = !args.contentOnly;
let regexOptions = args.ignoreCase ? "ig" : "g";
@@ -152,7 +152,7 @@
description: l10n.lookup("pagemodRemoveElementIfEmptyOnlyDesc"),
},
],
- exec: function (args, context) {
+ exec: function(args, context) {
let root = args.root || context.environment.document;
let elements = Array.prototype.slice.call(root.querySelectorAll(args.search));
@@ -206,7 +206,7 @@
description: l10n.lookup("pagemodRemoveAttributeIgnoreCaseDesc"),
},
],
- exec: function (args, context) {
+ exec: function(args, context) {
let root = args.root || context.environment.document;
let regexOptions = args.ignoreCase ? "ig" : "g";
let attributeRegex = new RegExp(args.searchAttributes, regexOptions);
@@ -254,7 +254,7 @@
defaultValue: "window"
}
],
- exec: function (args, context) {
+ exec: function(args, context) {
let html = context.environment.document.documentElement.outerHTML;
if (args.destination === "stdout") {
return html;
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/paintflashing.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/paintflashing.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/paintflashing.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/paintflashing.js 2018-03-14 13:35:19.000000000 +0000
@@ -176,7 +176,7 @@
},
],
returnType: "paintFlashingState",
- exec: function (args, context) {
+ exec: function(args, context) {
let { window } = context.environment;
return setPaintFlashing(window, args.state);
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/qsa.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/qsa.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/qsa.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/qsa.js 2018-03-14 13:35:19.000000000 +0000
@@ -17,7 +17,7 @@
type: "nodelist",
description: l10n.lookup("qsaQueryDesc")
}],
- exec: function (args, context) {
+ exec: function(args, context) {
return args.query.length;
}
}
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/rulers.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/rulers.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/rulers.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/rulers.js 2018-03-14 13:35:19.000000000 +0000
@@ -60,7 +60,7 @@
runAt: "server",
hidden: true,
returnType: "highlighterVisibility",
- exec: function (args, context) {
+ exec: function(args, context) {
let env = context.environment;
let { document } = env;
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/screenshot.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/screenshot.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/screenshot.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/screenshot.js 2018-03-14 13:35:19.000000000 +0000
@@ -46,7 +46,7 @@
* Both commands have almost the same set of standard optional parameters, except for the
* type of the --selector option, which can be a node only on the server.
*/
-const getScreenshotCommandParams = function (isClient) {
+const getScreenshotCommandParams = function(isClient) {
return {
group: l10n.lookup("screenshotGroupOptions"),
params: [
@@ -126,7 +126,7 @@
item: "converter",
from: "imageSummary",
to: "dom",
- exec: function (imageSummary, context) {
+ exec: function(imageSummary, context) {
const document = context.document;
const root = document.createElement("div");
@@ -186,7 +186,7 @@
filenameParam,
clientScreenshotParams,
],
- exec: function (args, context) {
+ exec: function(args, context) {
// Re-execute the command on the server
const command = context.typed.replace(/^screenshot/, "screenshot_server");
let capture = context.updateExec(command).then(output => {
@@ -207,7 +207,7 @@
filenameParam,
serverScreenshotParams,
],
- exec: function (args, context) {
+ exec: function(args, context) {
return captureScreenshot(args, context.environment.document);
},
}
@@ -345,7 +345,7 @@
const date = new Date();
let dateString = date.getFullYear() + "-" + (date.getMonth() + 1) +
"-" + date.getDate();
- dateString = dateString.split("-").map(function (part) {
+ dateString = dateString.split("-").map(function(part) {
if (part.length == 1) {
part = "0" + part;
}
@@ -441,7 +441,7 @@
xhr.send(fd);
xhr.responseType = "json";
- xhr.onreadystatechange = function () {
+ xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
reply.href = xhr.response.data.link;
@@ -489,7 +489,7 @@
}
DownloadListener.prototype = {
- QueryInterface: function (iid) {
+ QueryInterface: function(iid) {
if (iid.equals(Ci.nsIInterfaceRequestor) ||
iid.equals(Ci.nsIWebProgressListener) ||
iid.equals(Ci.nsIWebProgressListener2) ||
@@ -499,7 +499,7 @@
throw Cr.NS_ERROR_NO_INTERFACE;
},
- getInterface: function (iid) {
+ getInterface: function(iid) {
if (iid.equals(Ci.nsIAuthPrompt) ||
iid.equals(Ci.nsIAuthPrompt2)) {
let ww = Cc["@mozilla.org/embedcomp/window-watcher;1"]
@@ -510,7 +510,7 @@
throw Cr.NS_ERROR_NO_INTERFACE;
},
- onStateChange: function (webProgress, request, state, status) {
+ onStateChange: function(webProgress, request, state, status) {
// Check if the download has completed
if ((state & Ci.nsIWebProgressListener.STATE_STOP) &&
(state & Ci.nsIWebProgressListener.STATE_IS_NETWORK)) {
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/security.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/security.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/commands/security.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/commands/security.js 2018-03-14 13:35:19.000000000 +0000
@@ -61,7 +61,7 @@
description: l10n.lookup("securityCSPDesc"),
manual: l10n.lookup("securityCSPManual"),
returnType: "securityCSPInfo",
- exec: function (args, context) {
+ exec: function(args, context) {
let cspJSON = context.environment.document.nodePrincipal.cspJSON;
let cspOBJ = JSON.parse(cspJSON);
@@ -145,7 +145,7 @@
item: "converter",
from: "securityCSPInfo",
to: "view",
- exec: function (cspInfo, context) {
+ exec: function(cspInfo, context) {
const url = context.environment.target.url;
if (cspInfo.length == 0) {
@@ -200,7 +200,7 @@
description: l10n.lookup("securityReferrerPolicyDesc"),
manual: l10n.lookup("securityReferrerPolicyManual"),
returnType: "securityReferrerPolicyInfo",
- exec: function (args, context) {
+ exec: function(args, context) {
let doc = context.environment.document;
let { referrerPolicy } = doc;
@@ -306,7 +306,7 @@
item: "converter",
from: "securityReferrerPolicyInfo",
to: "view",
- exec: function (referrerPolicyInfo, context) {
+ exec: function(referrerPolicyInfo, context) {
return context.createView({
html:
"" +
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/templater.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/templater.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/gcli/templater.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/gcli/templater.js 2018-03-14 13:35:19.000000000 +0000
@@ -40,7 +40,7 @@
* convert null/undefined to ''. By setting blankNullUndefined:true, this
* conversion is handled by DOMTemplate
*/
-var template = function (node, data, options) {
+var template = function(node, data, options) {
let state = {
options: options || {},
// We keep a track of the nodes that we've passed through so we can keep
@@ -172,7 +172,7 @@
if (replacement && typeof replacement.then === "function") {
node.setAttribute(name, "");
/* jshint loopfunc:true */
- replacement.then(function (newValue) {
+ replacement.then(function(newValue) {
node.setAttribute(name, newValue);
}).catch(console.error);
} else {
@@ -214,7 +214,7 @@
* Handle attribute values where the output can only be a string
*/
function processString(state, value, data) {
- return value.replace(TEMPLATE_REGION, function (path) {
+ return value.replace(TEMPLATE_REGION, function(path) {
let insert = envEval(state, path.slice(2, -1), data, value);
return state.options.blankNullUndefined && insert == null ? "" : insert;
});
@@ -279,7 +279,7 @@
try {
let evaled = envEval(state, value, data, originalValue);
let cState = cloneState(state);
- handleAsync(evaled, node, function (reply, siblingNode) {
+ handleAsync(evaled, node, function(reply, siblingNode) {
processForEachLoop(cState, reply, node, siblingNode, data, paramName);
});
node.remove();
@@ -304,7 +304,7 @@
*/
function processForEachLoop(state, set, templNode, sibling, data, paramName) {
if (Array.isArray(set)) {
- set.forEach(function (member, i) {
+ set.forEach(function(member, i) {
processForEachMember(state, member, templNode, sibling,
data, paramName, "" + i);
});
@@ -335,10 +335,10 @@
state.stack.push(frame);
try {
let cState = cloneState(state);
- handleAsync(member, siblingNode, function (reply, node) {
+ handleAsync(member, siblingNode, function(reply, node) {
// Clone data because we can't be sure that we can safely mutate it
let newData = Object.create(null);
- Object.keys(data).forEach(function (key) {
+ Object.keys(data).forEach(function(key) {
newData[key] = data[key];
});
newData[paramName] = reply;
@@ -386,7 +386,7 @@
// Split a string using the unicode chars F001 and F002.
let parts = value.split(/\uF001|\uF002/);
if (parts.length > 1) {
- parts.forEach(function (part) {
+ parts.forEach(function(part) {
if (part === null || part === undefined || part === "") {
return;
}
@@ -394,7 +394,7 @@
part = envEval(state, part.slice(1), data, node.data);
}
let cState = cloneState(state);
- handleAsync(part, node, function (reply, siblingNode) {
+ handleAsync(part, node, function(reply, siblingNode) {
let doc = siblingNode.ownerDocument;
if (reply == null) {
reply = cState.options.blankNullUndefined ? "" : "" + reply;
@@ -408,7 +408,7 @@
// remove them from the document, and thus the NodeList, which in
// turn breaks iteration. So first we clone the list
let list = Array.prototype.slice.call(reply, 0);
- list.forEach(function (child) {
+ list.forEach(function(child) {
let imported = maybeImportNode(cState, child, doc);
siblingNode.parentNode.insertBefore(imported, siblingNode);
});
@@ -448,12 +448,12 @@
// Placeholder element to be replaced once we have the real data
let tempNode = siblingNode.ownerDocument.createElement("span");
siblingNode.parentNode.insertBefore(tempNode, siblingNode);
- thing.then(function (delayed) {
+ thing.then(function(delayed) {
inserter(delayed, tempNode);
if (tempNode.parentNode != null) {
tempNode.remove();
}
- }).catch(function (error) {
+ }).catch(function(error) {
console.error(error.stack);
});
} else {
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/heapsnapshot/census-tree-node.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/heapsnapshot/census-tree-node.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/heapsnapshot/census-tree-node.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/heapsnapshot/census-tree-node.js 2018-03-14 13:35:19.000000000 +0000
@@ -73,7 +73,7 @@
* @returns {String}
* The unique string that can be used as a key in a CensusTreeNodeCache.
*/
-CensusTreeNodeCache.hashFrame = function (frame) {
+CensusTreeNodeCache.hashFrame = function(frame) {
// eslint-disable-next-line max-len
return `FRAME,${frame.functionDisplayName},${frame.source},${frame.line},${frame.column},${frame.asyncCause}`;
};
@@ -89,7 +89,7 @@
* @returns {String}
* The unique string that can be used as a key in a CensusTreeNodeCache.
*/
-CensusTreeNodeCache.hashNode = function (node) {
+CensusTreeNodeCache.hashNode = function(node) {
return isSavedFrame(node.name)
? CensusTreeNodeCache.hashFrame(node.name)
: `NODE,${node.name}`;
@@ -102,7 +102,7 @@
* @param {CensusTreeNodeCache} cache
* @param {CensusTreeNodeCacheValue} value
*/
-CensusTreeNodeCache.insertFrame = function (cache, value) {
+CensusTreeNodeCache.insertFrame = function(cache, value) {
cache[CensusTreeNodeCache.hashFrame(value.node.name)] = value;
};
@@ -112,7 +112,7 @@
* @param {CensusTreeNodeCache} cache
* @param {CensusTreeNodeCacheValue} value
*/
-CensusTreeNodeCache.insertNode = function (cache, value) {
+CensusTreeNodeCache.insertNode = function(cache, value) {
if (isSavedFrame(value.node.name)) {
CensusTreeNodeCache.insertFrame(cache, value);
} else {
@@ -128,7 +128,7 @@
*
* @returns {undefined|CensusTreeNodeCacheValue}
*/
-CensusTreeNodeCache.lookupFrame = function (cache, frame) {
+CensusTreeNodeCache.lookupFrame = function(cache, frame) {
return cache[CensusTreeNodeCache.hashFrame(frame)];
};
@@ -140,7 +140,7 @@
*
* @returns {undefined|CensusTreeNodeCacheValue}
*/
-CensusTreeNodeCache.lookupNode = function (cache, node) {
+CensusTreeNodeCache.lookupNode = function(cache, node) {
return isSavedFrame(node.name)
? CensusTreeNodeCache.lookupFrame(cache, node.name)
: cache[CensusTreeNodeCache.hashNode(node)];
@@ -296,7 +296,7 @@
*
* @overrides Visitor.prototype.enter
*/
-CensusTreeNodeVisitor.prototype.enter = function (breakdown, report, edge) {
+CensusTreeNodeVisitor.prototype.enter = function(breakdown, report, edge) {
this._index++;
const cache = this._cacheStack[this._cacheStack.length - 1];
@@ -330,7 +330,7 @@
*
* @overrides Visitor.prototype.exit
*/
-CensusTreeNodeVisitor.prototype.exit = function (breakdown, report, edge) {
+CensusTreeNodeVisitor.prototype.exit = function(breakdown, report, edge) {
// Ensure all children are sorted and have their counts/bytes aggregated. We
// only need to consider cache children here, because other children
// correspond to other sub-reports and we already fixed them up in an earlier
@@ -368,7 +368,7 @@
/**
* @overrides Visitor.prototype.count
*/
-CensusTreeNodeVisitor.prototype.count = function (breakdown, report, edge) {
+CensusTreeNodeVisitor.prototype.count = function(breakdown, report, edge) {
const node = this._nodeStack[this._nodeStack.length - 1];
node.reportLeafIndex = this._index;
@@ -386,7 +386,7 @@
*
* @returns {CensusTreeNode}
*/
-CensusTreeNodeVisitor.prototype.root = function () {
+CensusTreeNodeVisitor.prototype.root = function() {
if (!this._root) {
throw new Error("Attempt to get the root before walking the census report!");
}
@@ -659,7 +659,7 @@
* @returns {Function}
*/
function makeFilterPredicate(filterString) {
- return function (node) {
+ return function(node) {
if (!node.name) {
return false;
}
@@ -704,7 +704,7 @@
*
* @returns {CensusTreeNode}
*/
-exports.censusReportToCensusTreeNode = function (breakdown, report,
+exports.censusReportToCensusTreeNode = function(breakdown, report,
options = {
invert: false,
filter: null
diff -Nru firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/heapsnapshot/CensusUtils.js firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/heapsnapshot/CensusUtils.js
--- firefox-trunk-60.0~a1~hg20180311r407525/devtools/shared/heapsnapshot/CensusUtils.js 2018-03-11 11:25:01.000000000 +0000
+++ firefox-trunk-61.0~a1~hg20180314r408098/devtools/shared/heapsnapshot/CensusUtils.js 2018-03-14 13:35:19.000000000 +0000
@@ -27,7 +27,7 @@
* The edge leading to this sub-report. The edge is null if (but not iff!
* eg, null allocation stack edges) we are entering the root report.
*/
-Visitor.prototype.enter = function (breakdown, report, edge) { };
+Visitor.prototype.enter = function(breakdown, report, edge) { };
/**
* The `exit` method is called when traversal of a sub-report has finished.
@@ -42,7 +42,7 @@
* The edge leading to this sub-report. The edge is null if (but not iff!
* eg, null allocation stack edges) we are entering the root report.
*/
-Visitor.prototype.exit = function (breakdown, report, edge) { };
+Visitor.prototype.exit = function(breakdown, report, edge) { };
/**
* The `count` method is called when leaf nodes (reports whose breakdown is
@@ -58,21 +58,21 @@
* The edge leading to this count report. The edge is null if we are
* entering the root report.
*/
-Visitor.prototype.count = function (breakdown, report, edge) { };
+Visitor.prototype.count = function(breakdown, report, edge) { };
/** * getReportEdges *********************************************************/
const EDGES = Object.create(null);
-EDGES.count = function (breakdown, report) {
+EDGES.count = function(breakdown, report) {
return [];
};
-EDGES.bucket = function (breakdown, report) {
+EDGES.bucket = function(breakdown, report) {
return [];
};
-EDGES.internalType = function (breakdown, report) {
+EDGES.internalType = function(breakdown, report) {
return Object.keys(report).map(key => ({
edge: key,
referent: report[key],
@@ -80,7 +80,7 @@
}));
};
-EDGES.objectClass = function (breakdown, report) {
+EDGES.objectClass = function(breakdown, report) {
return Object.keys(report).map(key => ({
edge: key,
referent: report[key],
@@ -88,7 +88,7 @@
}));
};
-EDGES.coarseType = function (breakdown, report) {
+EDGES.coarseType = function(breakdown, report) {
return [
{ edge: "objects", referent: report.objects, breakdown: breakdown.objects },
{ edge: "scripts", referent: report.scripts, breakdown: breakdown.scripts },
@@ -97,7 +97,7 @@
];
};
-EDGES.allocationStack = function (breakdown, report) {
+EDGES.allocationStack = function(breakdown, report) {
const edges = [];
report.forEach((value, key) => {
edges.push({
@@ -109,7 +109,7 @@
return edges;
};
-EDGES.filename = function (breakdown, report) {
+EDGES.filename = function(breakdown, report) {
return Object.keys(report).map(key => ({
edge: key,
referent: report[key],
@@ -214,7 +214,7 @@
/**
* Given a report and an outgoing edge, get the edge's referent.
*/
-DiffVisitor.prototype._get = function (report, edge) {
+DiffVisitor.prototype._get = function(report, edge) {
if (!report) {
return undefined;
}
@@ -225,7 +225,7 @@
* Given a report, an outgoing edge, and a value, set the edge's referent to
* the given value.
*/
-DiffVisitor.prototype._set = function (report, edge, val) {
+DiffVisitor.prototype._set = function(report, edge, val) {
if (isMap(report)) {
report.set(edge, val);
} else {
@@ -236,7 +236,7 @@
/**
* @overrides Visitor.prototype.enter
*/
-DiffVisitor.prototype.enter = function (breakdown, report, edge) {
+DiffVisitor.prototype.enter = function(breakdown, report, edge) {
const newResults = breakdown.by === "allocationStack" ? new Map() : {};
let newOther;
@@ -263,7 +263,7 @@
/**
* @overrides Visitor.prototype.exit
*/
-DiffVisitor.prototype.exit = function (breakdown, report, edge) {
+DiffVisitor.prototype.exit = function(breakdown, report, edge) {
// Find all the edges in the other census report that were not traversed and
// add them to the results directly.
const other = this._otherCensusStack[this._otherCensusStack.length - 1];
@@ -286,7 +286,7 @@
/**
* @overrides Visitor.prototype.count
*/
-DiffVisitor.prototype.count = function (breakdown, report, edge) {
+DiffVisitor.prototype.count = function(breakdown, report, edge) {
const other = this._otherCensusStack[this._otherCensusStack.length - 1];
const results = this._resultsStack[this._resultsStack.length - 1];
@@ -324,7 +324,7 @@
* @returns {Object}
* The delta census report.
*/
-DiffVisitor.prototype.results = function () {
+DiffVisitor.prototype.results = function() {
if (!this._results) {
throw new Error("Attempt to get results before computing diff!");
}
@@ -375,7 +375,7 @@
*
* @return {Object}
*/
-const createParentMap = function (node, getId = n => n.id, aggregator = {}) {
+const createParentMap = function(node, getId = n => n.id, aggregator = {}) {
if (node.children) {
for (let i = 0, length = node.children.length; i < length; i++) {
const child = node.children[i];
@@ -396,7 +396,7 @@
* @param {Object} breakdown
* @returns {Object}
*/
-exports.countToBucketBreakdown = function (breakdown) {
+exports.countToBucketBreakdown = function(breakdown) {
if (typeof breakdown !== "object" || !breakdown) {
return breakdown;
}
@@ -433,7 +433,7 @@
/**
* @overrides Visitor.prototype.enter
*/
-GetLeavesVisitor.prototype.enter = function (breakdown, report, edge) {
+GetLeavesVisitor.prototype.enter = function(breakdown, report, edge) {
this._index++;
if (this._targetIndices.has(this._index)) {
this._leaves.push(report);
@@ -443,7 +443,7 @@
/**
* Get the accumulated report leaves after traversal.
*/
-GetLeavesVisitor.prototype.leaves = function () {
+GetLeavesVisitor.prototype.leaves = function() {
if (this._index === -1) {
throw new Error("Attempt to call `leaves` before traversing report!");
}
@@ -460,7 +460,7 @@
*
* @returns {Array