Chromium Code Reviews| 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; |