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

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

Issue 1653053002: Devtools: parse variables scopes and sourcemap them (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 bc6beda2dea6320935716c2052324354e452c3cf..159b9af753df1e5cac5647e7ae56cb8f9ee327a1 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
@@ -1511,7 +1511,7 @@ InjectedScript.CallFrameProxy.prototype = {
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");
+ scopeChainProxy[i] = InjectedScript.CallFrameProxy._createScopeJson(callFrame.scopeType(i), callFrame.scopeName(i), scopeChain[i], "backtrace", callFrame.scopeStartLocation(i), callFrame.scopeEndLocation(i) );
return scopeChainProxy;
},
@@ -1538,9 +1538,11 @@ InjectedScript.CallFrameProxy._scopeTypeNames = {
* @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)
+InjectedScript.CallFrameProxy._createScopeJson = function(scopeTypeCode, scopeName, scopeObject, groupId, startLocation, endLocation)
{
var scope = {
object: injectedScript._wrapObject(scopeObject, groupId),
@@ -1549,6 +1551,12 @@ InjectedScript.CallFrameProxy._createScopeJson = function(scopeTypeCode, scopeNa
};
if (scopeName)
scope.name = scopeName;
+
+ if (startLocation)
+ scope.startLocation = startLocation;
+ if (endLocation)
+ scope.endLocation = endLocation;
+
return scope;
}

Powered by Google App Engine
This is Rietveld 408576698