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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.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/DebuggerScript.js
diff --git a/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js b/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js
index 14eeaa2fef7272912e0b6b2b8a5e1ef4e00dc47d..203fa55665fa4ce76f5ec3f04f2825de26f82c9c 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js
@@ -48,6 +48,17 @@ DebuggerScript.getAfterCompileScript = function(eventData)
return DebuggerScript._formatScript(eventData.script_.script_);
}
+DebuggerScript._scopeTypeNames = {
+ 0: "global",
dgozman 2016/03/18 23:27:55 0 -> ScopeType.Global, etc.
kozy 2016/03/19 00:40:23 Done.
+ 1: "local",
+ 2: "with",
+ 3: "closure",
+ 4: "catch",
+ 5: "block",
+ 6: "script",
+ __proto__: null
+};
+
DebuggerScript.getFunctionScopes = function(fun)
{
var mirror = MakeMirror(fun);
@@ -63,9 +74,9 @@ DebuggerScript.getFunctionScopes = function(fun)
if (!scopeObject)
continue;
result.push({
- type: scopeDetails.type(),
+ type: DebuggerScript._scopeTypeNames[scopeDetails.type()],
object: scopeObject,
- name: scopeDetails.name()
+ name: scopeDetails.name() || ""
});
}
return result;

Powered by Google App Engine
This is Rietveld 408576698