Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js

Issue 1921413002: [DevTools] Move inspect and copy to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 878192eb5f106e0c2fcd786b1d65bcc42ea6aa47..4043f68d9de3bc002fd7ef94107dbee26c78c338 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
@@ -366,22 +366,6 @@ InjectedScript.prototype = {
},
/**
- * @param {*} object
- * @return {*}
- */
- _inspect: function(object)
- {
- if (arguments.length === 0)
- return;
-
- var objectId = this._wrapObject(object, "");
- var hints = { __proto__: null };
-
- InjectedScriptHost.inspect(objectId, hints);
- return object;
- },
-
- /**
* This method cannot throw.
* @param {*} object
* @param {string=} objectGroupName
@@ -614,7 +598,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", "inspect", "copy", "getEventListeners" ];
+ var members = [ "$", "$$", "$x", "monitorEvents", "unmonitorEvents", "getEventListeners" ];
var commandLineAPIImpl = this._commandLineAPIImpl;
for (var member of members)
nativeCommandLineAPI[member] = bind(commandLineAPIImpl[member], commandLineAPIImpl);
@@ -1261,35 +1245,6 @@ CommandLineAPIImpl.prototype = {
},
/**
- * @param {*} object
- * @return {*}
- */
- inspect: function(object)
- {
- return injectedScript._inspect(object);
- },
-
- copy: function(object)
- {
- var string;
- if (injectedScript._subtype(object) === "node") {
- string = object.outerHTML;
- } else if (injectedScript.isPrimitiveValue(object)) {
- string = toString(object);
- } else {
- try {
- string = JSON.stringify(object, null, " ");
- } catch (e) {
- string = toString(object);
- }
- }
-
- var hints = { copyToClipboard: true, __proto__: null };
- var remoteObject = injectedScript._wrapObject(string, "")
- InjectedScriptHost.inspect(remoteObject, hints);
- },
-
- /**
* @param {!Node} node
* @return {!Object|undefined}
*/

Powered by Google App Engine
This is Rietveld 408576698