| Index: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
|
| diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
|
| index e20c21d574958d1519ab7d2e255701e448bf1559..088e287db4daf6d69e90023ffced28746293a151 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
|
| @@ -54,20 +54,6 @@ function push(array, var_args)
|
| }
|
|
|
| /**
|
| - * @param {(!Arguments.<T>|!NodeList)} array
|
| - * @param {number=} index
|
| - * @return {!Array.<T>}
|
| - * @template T
|
| - */
|
| -function slice(array, index)
|
| -{
|
| - var result = [];
|
| - for (var i = index || 0, j = 0; i < array.length; ++i, ++j)
|
| - result[j] = array[i];
|
| - return result;
|
| -}
|
| -
|
| -/**
|
| * @param {*} obj
|
| * @return {string}
|
| * @suppress {uselessCode}
|
| @@ -542,7 +528,7 @@ InjectedScript.prototype = {
|
| {
|
| // NOTE: This list contains only not native Command Line API methods. For full list: V8Console.
|
| // NOTE: Argument names of these methods will be printed in the console, so use pretty names!
|
| - var members = [ "$", "$$", "$x", "monitorEvents", "unmonitorEvents", "getEventListeners" ];
|
| + var members = [ "$x", "monitorEvents", "unmonitorEvents", "getEventListeners" ];
|
| for (var member of members)
|
| nativeCommandLineAPI[member] = CommandLineAPIImpl[member];
|
| var functionToStringMap = new Map([
|
| @@ -567,8 +553,8 @@ InjectedScript.prototype = {
|
| ["unmonitorEvents", "function unmonitorEvents(object, [types]) { [Command Line API] }"],
|
| ["getEventListeners", "function getEventListeners(node) { [Command Line API] }"]
|
| ]);
|
| - for (let entry of functionToStringMap)
|
| - nativeCommandLineAPI[entry[0]].toString = (() => entry[1]);
|
| + for (let func in nativeCommandLineAPI)
|
| + nativeCommandLineAPI[func].toString = (() => functionToStringMap.get(func));
|
| return nativeCommandLineAPI;
|
| },
|
|
|
| @@ -1091,40 +1077,6 @@ InjectedScript.RemoteObject.prototype = {
|
| var CommandLineAPIImpl = { __proto__: null }
|
|
|
| /**
|
| - * @param {string} selector
|
| - * @param {!Node=} opt_startNode
|
| - * @return {*}
|
| - */
|
| -CommandLineAPIImpl.$ = function (selector, opt_startNode)
|
| -{
|
| - if (CommandLineAPIImpl._canQuerySelectorOnNode(opt_startNode))
|
| - return opt_startNode.querySelector(selector);
|
| -
|
| - return inspectedGlobalObject.document.querySelector(selector);
|
| -}
|
| -
|
| -/**
|
| - * @param {string} selector
|
| - * @param {!Node=} opt_startNode
|
| - * @return {*}
|
| - */
|
| -CommandLineAPIImpl.$$ = function (selector, opt_startNode)
|
| -{
|
| - if (CommandLineAPIImpl._canQuerySelectorOnNode(opt_startNode))
|
| - return slice(opt_startNode.querySelectorAll(selector));
|
| - return slice(inspectedGlobalObject.document.querySelectorAll(selector));
|
| -}
|
| -
|
| -/**
|
| - * @param {!Node=} node
|
| - * @return {boolean}
|
| - */
|
| -CommandLineAPIImpl._canQuerySelectorOnNode = function(node)
|
| -{
|
| - return !!node && InjectedScriptHost.subtype(node) === "node" && (node.nodeType === Node.ELEMENT_NODE || node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE);
|
| -}
|
| -
|
| -/**
|
| * @param {string} xpath
|
| * @param {!Node=} opt_startNode
|
| * @return {*}
|
|
|