| 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..f4c38439e40102e8e2ba895774b222a8079d4844 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/DebuggerScript.js
|
| @@ -48,6 +48,15 @@ DebuggerScript.getAfterCompileScript = function(eventData)
|
| return DebuggerScript._formatScript(eventData.script_.script_);
|
| }
|
|
|
| +DebuggerScript._scopeTypeNames = { __proto__: null };
|
| +DebuggerScript._scopeTypeNames[ScopeType.Global] = "global";
|
| +DebuggerScript._scopeTypeNames[ScopeType.Local] = "local";
|
| +DebuggerScript._scopeTypeNames[ScopeType.With] = "with";
|
| +DebuggerScript._scopeTypeNames[ScopeType.Closure] = "closure";
|
| +DebuggerScript._scopeTypeNames[ScopeType.Catch] = "catch";
|
| +DebuggerScript._scopeTypeNames[ScopeType.Block] = "block";
|
| +DebuggerScript._scopeTypeNames[ScopeType.Script] = "script";
|
| +
|
| DebuggerScript.getFunctionScopes = function(fun)
|
| {
|
| var mirror = MakeMirror(fun);
|
| @@ -63,9 +72,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;
|
| @@ -432,7 +441,7 @@ DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
|
| for (var i = 0, j = 0; i < scopeObjects.length; ++i) {
|
| var scopeObject = DebuggerScript._buildScopeObject(scopeTypes[i], scopeObjects[i]);
|
| if (scopeObject) {
|
| - scopeTypes[j] = scopeTypes[i];
|
| + scopeTypes[j] = DebuggerScript._scopeTypeNames[scopeTypes[i]];
|
| scopeNames[j] = scopeNames[i];
|
| scopeChain[j] = scopeObject;
|
|
|
|
|