Title: [86835] trunk/Source/WebCore
Revision
86835
Author
[email protected]
Date
2011-05-19 04:09:24 -0700 (Thu, 19 May 2011)

Log Message

2011-05-19  Pavel Feldman  <[email protected]>

        Reviewed by Yury Semikhatsky.

        Web Inspector: make "this" a part of callFrame, not scope in the protocol.
        https://bugs.webkit.org/show_bug.cgi?id=61057

        * inspector/InjectedScriptSource.js:
        * inspector/Inspector.json:
        * inspector/front-end/ScopeChainSidebarPane.js:
        (WebInspector.ScopeChainSidebarPane.prototype.update):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (86834 => 86835)


--- trunk/Source/WebCore/ChangeLog	2011-05-19 11:04:13 UTC (rev 86834)
+++ trunk/Source/WebCore/ChangeLog	2011-05-19 11:09:24 UTC (rev 86835)
@@ -1,3 +1,15 @@
+2011-05-19  Pavel Feldman  <[email protected]>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: make "this" a part of callFrame, not scope in the protocol.
+        https://bugs.webkit.org/show_bug.cgi?id=61057
+
+        * inspector/InjectedScriptSource.js:
+        * inspector/Inspector.json:
+        * inspector/front-end/ScopeChainSidebarPane.js:
+        (WebInspector.ScopeChainSidebarPane.prototype.update):
+
 2011-05-19  Kent Tamura  <[email protected]>
 
         Reviewed by Hajime Morita.

Modified: trunk/Source/WebCore/inspector/InjectedScriptSource.js (86834 => 86835)


--- trunk/Source/WebCore/inspector/InjectedScriptSource.js	2011-05-19 11:04:13 UTC (rev 86834)
+++ trunk/Source/WebCore/inspector/InjectedScriptSource.js	2011-05-19 11:09:24 UTC (rev 86835)
@@ -456,6 +456,7 @@
     this.functionName = (callFrame.type === "function" ? callFrame.functionName : "");
     this.location = { sourceId: String(callFrame.sourceID), lineNumber: callFrame.line, columnNumber: callFrame.column };
     this.scopeChain = this._wrapScopeChain(callFrame);
+    this.this = injectedScript._wrapObject(callFrame.thisObject, "backtrace");
 }
 
 InjectedScript.CallFrameProxy.prototype = {
@@ -483,10 +484,6 @@
 
             var scopeType = callFrame.scopeType(i);
             scope.type = scopeTypeNames[scopeType];
-
-            if (scopeType === LOCAL_SCOPE)
-                scope.this = injectedScript._wrapObject(callFrame.thisObject, "backtrace");
-
             scopeChainProxy.push(scope);
         }
         return scopeChainProxy;

Modified: trunk/Source/WebCore/inspector/Inspector.json (86834 => 86835)


--- trunk/Source/WebCore/inspector/Inspector.json	2011-05-19 11:04:13 UTC (rev 86834)
+++ trunk/Source/WebCore/inspector/Inspector.json	2011-05-19 11:09:24 UTC (rev 86835)
@@ -1354,7 +1354,8 @@
                     { "name": "id", "type": "string", "description": "Call frame identifier." },
                     { "name": "functionName", "type": "string", "description": "Name of the function called on this frame." },
                     { "name": "location", "$ref": "Location", "description": "Location in the source code." },
-                    { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for given call frame." }
+                    { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for given call frame." },
+                    { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." }
                 ],
                 "description": "Debugger call frame. Array of call frames form call stack."
             },
@@ -1363,8 +1364,7 @@
                 "type": "object",
                 "properties": [
                     { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch"], "description": "Scope type." },
-                    { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope." },
-                    { "name": "this", "$ref": "Runtime.RemoteObject", "optional": true, "description": "<code>this</code> object for local scope." }
+                    { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope." }
                 ],
                 "description": "Debugger call frame. Array of call frames form call stack."
             }

Modified: trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js (86834 => 86835)


--- trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js	2011-05-19 11:04:13 UTC (rev 86834)
+++ trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js	2011-05-19 11:09:24 UTC (rev 86835)
@@ -684,6 +684,11 @@
         return this._callFrame.scopeChain;
     },
 
+    get this()
+    {
+        return this._callFrame.this;
+    },
+
     get index()
     {
         return this._index;

Modified: trunk/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js (86834 => 86835)


--- trunk/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js	2011-05-19 11:04:13 UTC (rev 86834)
+++ trunk/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js	2011-05-19 11:09:24 UTC (rev 86835)
@@ -72,8 +72,8 @@
                     title = WebInspector.UIString("Local");
                     emptyPlaceholder = WebInspector.UIString("No Variables");
                     subtitle = null;
-                    if (scope.this)
-                        extraProperties = [ new WebInspector.RemoteObjectProperty("this", WebInspector.RemoteObject.fromPayload(scope.this)) ];
+                    if (callFrame.this)
+                        extraProperties = [ new WebInspector.RemoteObjectProperty("this", WebInspector.RemoteObject.fromPayload(callFrame.this)) ];
                     if (i == 0) {
                         var exception = WebInspector.debuggerModel.debuggerPausedDetails.exception;
                         if (exception) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to