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

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

Issue 1815753002: [DevTools] Move getFunctionDetails to native (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-get-internal-properties
Patch Set: Created 4 years, 9 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 f3e5076fb1eb32ae76f827537bf60d3d98e1fab5..6e5e037e45468e14e4dc8938743a96ddc1ad138d 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
@@ -450,29 +450,6 @@ InjectedScript.prototype = {
},
/**
- * @param {string} functionId
- * @return {!DebuggerAgent.FunctionDetails|string}
- */
- getFunctionDetails: function(functionId)
- {
- var parsedFunctionId = this._parseObjectId(functionId);
- var func = this._objectForId(parsedFunctionId);
- if (typeof func !== "function")
- return "Cannot resolve function by id.";
- var details = nullifyObjectProto(/** @type {!DebuggerAgent.FunctionDetails} */ (InjectedScriptHost.functionDetails(func)));
- if ("rawScopes" in details) {
- var objectGroupName = InjectedScriptHost.idToObjectGroupName(parsedFunctionId.id);
- var rawScopes = details["rawScopes"];
- delete details["rawScopes"];
- var scopes = [];
- for (var i = 0; i < rawScopes.length; ++i)
- scopes[i] = InjectedScript.CallFrameProxy._createScopeJson(rawScopes[i].type, rawScopes[i].name, rawScopes[i].object, objectGroupName);
- details.scopeChain = scopes;
- }
- return details;
- },
-
- /**
* @param {string} objectId
* @return {!Array.<!Object>|string}
*/
@@ -1225,23 +1202,6 @@ InjectedScript.CallFrameProxy = function(ordinal, callFrame)
this.returnValue = injectedScript._wrapObject(callFrame.returnValue, "backtrace");
}
-InjectedScript.CallFrameProxy.prototype = {
- /**
- * @param {!JavaScriptCallFrame} callFrame
- * @return {!Array.<!DebuggerAgent.Scope>}
- */
- _wrapScopeChain: function(callFrame)
- {
- var scopeChain = callFrame.scopeChain;
- var scopeChainProxy = [];
- for (var i = 0; i < scopeChain.length; ++i)
- scopeChainProxy[i] = InjectedScript.CallFrameProxy._createScopeJson(callFrame.scopeType(i), callFrame.scopeName(i), scopeChain[i], "backtrace", callFrame.scopeStartLocation(i), callFrame.scopeEndLocation(i) );
- return scopeChainProxy;
- },
-
- __proto__: null
-}
-
/**
* @const
* @type {!Object.<number, !DebuggerAgent.ScopeType>}
@@ -1257,31 +1217,47 @@ InjectedScript.CallFrameProxy._scopeTypeNames = {
__proto__: null
};
-/**
- * @param {number} scopeTypeCode
- * @param {string} scopeName
- * @param {*} scopeObject
- * @param {string} groupId
- * @param {?DebuggerAgent.Location=} startLocation
- * @param {?DebuggerAgent.Location=} endLocation
- * @return {!DebuggerAgent.Scope}
- */
-InjectedScript.CallFrameProxy._createScopeJson = function(scopeTypeCode, scopeName, scopeObject, groupId, startLocation, endLocation)
-{
- var scope = {
- object: injectedScript._wrapObject(scopeObject, groupId),
- type: InjectedScript.CallFrameProxy._scopeTypeNames[scopeTypeCode],
- __proto__: null
- };
- if (scopeName)
- scope.name = scopeName;
+InjectedScript.CallFrameProxy.prototype = {
+ /**
+ * @param {!JavaScriptCallFrame} callFrame
+ * @return {!Array.<!DebuggerAgent.Scope>}
+ */
+ _wrapScopeChain: function(callFrame)
+ {
+ var scopeChain = callFrame.scopeChain;
+ var scopeChainProxy = [];
+ for (var i = 0; i < scopeChain.length; ++i)
+ scopeChainProxy[i] = this._createScopeJson(callFrame.scopeType(i), callFrame.scopeName(i), scopeChain[i], callFrame.scopeStartLocation(i), callFrame.scopeEndLocation(i) );
+ return scopeChainProxy;
+ },
- if (startLocation)
- scope.startLocation = startLocation;
- if (endLocation)
- scope.endLocation = endLocation;
+ /**
+ * @param {number} scopeTypeCode
+ * @param {string} scopeName
+ * @param {*} scopeObject
+ * @param {?DebuggerAgent.Location} startLocation
+ * @param {?DebuggerAgent.Location} endLocation
+ * @return {!DebuggerAgent.Scope}
+ */
+ _createScopeJson: function(scopeTypeCode, scopeName, scopeObject, startLocation, endLocation)
+ {
+ var scope = {
+ object: injectedScript._wrapObject(scopeObject, "backtrace"),
+ type: InjectedScript.CallFrameProxy._scopeTypeNames[scopeTypeCode],
+ __proto__: null
+ };
+ if (scopeName)
+ scope.name = scopeName;
+
+ if (startLocation)
+ scope.startLocation = startLocation;
+ if (endLocation)
+ scope.endLocation = endLocation;
- return scope;
+ return scope;
+ },
+
+ __proto__: null
}
/**

Powered by Google App Engine
This is Rietveld 408576698