Changeset 86835 in webkit


Ignore:
Timestamp:
May 19, 2011 4:09:24 AM (13 years ago)
Author:
pfeldman@chromium.org
Message:

2011-05-19 Pavel Feldman <pfeldman@google.com>

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):
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86832 r86835  
     12011-05-19  Pavel Feldman  <pfeldman@google.com>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: make "this" a part of callFrame, not scope in the protocol.
     6        https://bugs.webkit.org/show_bug.cgi?id=61057
     7
     8        * inspector/InjectedScriptSource.js:
     9        * inspector/Inspector.json:
     10        * inspector/front-end/ScopeChainSidebarPane.js:
     11        (WebInspector.ScopeChainSidebarPane.prototype.update):
     12
    1132011-05-19  Kent Tamura  <tkent@chromium.org>
    214
  • trunk/Source/WebCore/inspector/InjectedScriptSource.js

    r86752 r86835  
    457457    this.location = { sourceId: String(callFrame.sourceID), lineNumber: callFrame.line, columnNumber: callFrame.column };
    458458    this.scopeChain = this._wrapScopeChain(callFrame);
     459    this.this = injectedScript._wrapObject(callFrame.thisObject, "backtrace");
    459460}
    460461
     
    484485            var scopeType = callFrame.scopeType(i);
    485486            scope.type = scopeTypeNames[scopeType];
    486 
    487             if (scopeType === LOCAL_SCOPE)
    488                 scope.this = injectedScript._wrapObject(callFrame.thisObject, "backtrace");
    489 
    490487            scopeChainProxy.push(scope);
    491488        }
  • trunk/Source/WebCore/inspector/Inspector.json

    r86760 r86835  
    13551355                    { "name": "functionName", "type": "string", "description": "Name of the function called on this frame." },
    13561356                    { "name": "location", "$ref": "Location", "description": "Location in the source code." },
    1357                     { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for given call frame." }
     1357                    { "name": "scopeChain", "type": "array", "items": { "$ref": "Scope" }, "description": "Scope chain for given call frame." },
     1358                    { "name": "this", "$ref": "Runtime.RemoteObject", "description": "<code>this</code> object for this call frame." }
    13581359                ],
    13591360                "description": "Debugger call frame. Array of call frames form call stack."
     
    13641365                "properties": [
    13651366                    { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch"], "description": "Scope type." },
    1366                     { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope." },
    1367                     { "name": "this", "$ref": "Runtime.RemoteObject", "optional": true, "description": "<code>this</code> object for local scope." }
     1367                    { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope." }
    13681368                ],
    13691369                "description": "Debugger call frame. Array of call frames form call stack."
  • trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js

    r86752 r86835  
    685685    },
    686686
     687    get this()
     688    {
     689        return this._callFrame.this;
     690    },
     691
    687692    get index()
    688693    {
  • trunk/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js

    r85042 r86835  
    7373                    emptyPlaceholder = WebInspector.UIString("No Variables");
    7474                    subtitle = null;
    75                     if (scope.this)
    76                         extraProperties = [ new WebInspector.RemoteObjectProperty("this", WebInspector.RemoteObject.fromPayload(scope.this)) ];
     75                    if (callFrame.this)
     76                        extraProperties = [ new WebInspector.RemoteObjectProperty("this", WebInspector.RemoteObject.fromPayload(callFrame.this)) ];
    7777                    if (i == 0) {
    7878                        var exception = WebInspector.debuggerModel.debuggerPausedDetails.exception;
Note: See TracChangeset for help on using the changeset viewer.