Changeset 109560 in webkit


Ignore:
Timestamp:
Mar 2, 2012 5:15:09 AM (12 years ago)
Author:
podivilov@chromium.org
Message:

Web Inspector: update execution line using LiveLocation.
https://bugs.webkit.org/show_bug.cgi?id=80143

Reviewed by Vsevolod Vlasov.

  • inspector/front-end/DebuggerPresentationModel.js:

(WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeListChanged):
(WebInspector.DebuggerPresentationModel.prototype._debuggerResumed):
(WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame.updateExecutionLine):
(WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame):

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/inspector/debugger/callstack-placards-discarded-expected.txt

    r108971 r109560  
    88Received DebuggerPaused event.
    99Function name: testFunction
    10 Listeners length: 2
     10Listeners length: 3
    1111Script execution paused.
    1212Script execution resumed.
     
    1414Received DebuggerPaused event.
    1515Function name: testFunction
    16 Listeners length: 2
     16Listeners length: 3
    1717Script execution paused.
    1818Script execution resumed.
  • trunk/Source/WebCore/ChangeLog

    r109559 r109560  
     12012-03-02  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Web Inspector: update execution line using LiveLocation.
     4        https://bugs.webkit.org/show_bug.cgi?id=80143
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        * inspector/front-end/DebuggerPresentationModel.js:
     9        (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeListChanged):
     10        (WebInspector.DebuggerPresentationModel.prototype._debuggerResumed):
     11        (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame.updateExecutionLine):
     12        (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame):
     13
    1142012-03-02  Leo Yang  <leo.yang@torchmobile.com.cn>
    215
  • trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js

    r109351 r109560  
    211211
    212212        this._restoreBreakpoints(rawSourceCode);
    213         this._restoreExecutionLine(rawSourceCode);
    214213
    215214        var uiSourceCodeList = rawSourceCode.uiSourceCodeList();
     
    236235                this._breakpointAdded(breakpoints[lineNumber]);
    237236        }
    238     },
    239 
    240     /**
    241      * @param {WebInspector.RawSourceCode} rawSourceCode
    242      */
    243     _restoreExecutionLine: function(rawSourceCode)
    244     {
    245         if (!this._selectedCallFrame || this._selectedCallFrame.rawSourceCode !== rawSourceCode)
    246             return;
    247 
    248         var uiLocation = rawSourceCode.rawLocationToUILocation(this._selectedCallFrame._callFrame.location);
    249         this.dispatchEventToListeners(WebInspector.DebuggerPresentationModel.Events.ExecutionLineChanged, uiLocation);
    250237    },
    251238
     
    568555    set selectedCallFrame(callFrame)
    569556    {
     557        if (this._executionLineLiveLocation)
     558            this._executionLineLiveLocation.dispose();
     559        delete this._executionLineLiveLocation;
     560       
    570561        this._selectedCallFrame = callFrame;
    571562        if (!this._selectedCallFrame)
     
    575566        this.dispatchEventToListeners(WebInspector.DebuggerPresentationModel.Events.CallFrameSelected, callFrame);
    576567
    577         var uiLocation = callFrame.rawSourceCode.rawLocationToUILocation(callFrame._callFrame.location);
    578         if (uiLocation)
     568        function updateExecutionLine(uiLocation)
     569        {
    579570            this.dispatchEventToListeners(WebInspector.DebuggerPresentationModel.Events.ExecutionLineChanged, uiLocation);
     571        }
     572        this._executionLineLiveLocation = this._selectedCallFrame.rawSourceCode.createLiveLocation(callFrame._callFrame.location, updateExecutionLine.bind(this));
     573        this._executionLineLiveLocation.init();
    580574    },
    581575
Note: See TracChangeset for help on using the changeset viewer.