Changeset 120336 in webkit


Ignore:
Timestamp:
Jun 14, 2012, 9:58:05 AM (13 years ago)
Author:
vsevik@chromium.org
Message:

Web Inspector: Breakpoints should not be set when UISourceCode content is diverged from VM version of the script.
https://bugs.webkit.org/show_bug.cgi?id=89109

Reviewed by Pavel Feldman.

  • inspector/front-end/BreakpointManager.js:

(WebInspector.BreakpointManager.Breakpoint.prototype._updateBreakpoint):

  • inspector/front-end/JavaScriptSource.js:

(WebInspector.JavaScriptSource.prototype.isDivergedFromVM):
(WebInspector.JavaScriptSource.prototype.workingCopyCommitted):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r120335 r120336  
     12012-06-14  Vsevolod Vlasov  <vsevik@chromium.org>
     2
     3        Web Inspector: Breakpoints should not be set when UISourceCode content is diverged from VM version of the script.
     4        https://bugs.webkit.org/show_bug.cgi?id=89109
     5
     6        Reviewed by Pavel Feldman.
     7
     8        * inspector/front-end/BreakpointManager.js:
     9        (WebInspector.BreakpointManager.Breakpoint.prototype._updateBreakpoint):
     10        * inspector/front-end/JavaScriptSource.js:
     11        (WebInspector.JavaScriptSource.prototype.isDivergedFromVM):
     12        (WebInspector.JavaScriptSource.prototype.workingCopyCommitted):
     13
    1142012-06-14  Vsevolod Vlasov  <vsevik@chromium.org>
    215
  • trunk/Source/WebCore/inspector/front-end/BreakpointManager.js

    r120335 r120336  
    357357        this._breakpointManager._storage._updateBreakpoint(this);
    358358
    359         if (this._enabled) {
     359        if (this._enabled && !this._primaryUILocation.uiSourceCode.isDivergedFromVM()) {
    360360            this._setInDebugger();
    361361            return;
  • trunk/Source/WebCore/inspector/front-end/JavaScriptSource.js

    r119898 r120336  
    181181
    182182    /**
     183     * @return {boolean}
     184     */
     185    isDivergedFromVM: function()
     186    {
     187        // FIXME: We should return true if this._isDivergedFromVM is set as well once we provide a way to set breakpoints after LiveEdit failure.
     188        return this.isDirty();
     189    },
     190
     191    /**
    183192     * @param {function(?string)} callback
    184193     */
    185194    workingCopyCommitted: function(callback)
    186195    { 
    187         WebInspector.DebuggerResourceBinding.setScriptSource(this, this.workingCopy(), callback);
     196        /**
     197         * @param {?string} error
     198         */
     199        function innerCallback(error)
     200        {
     201            this._isDivergedFromVM = !!error;
     202            callback(error);
     203        }
     204
     205        WebInspector.DebuggerResourceBinding.setScriptSource(this, this.workingCopy(), innerCallback.bind(this));
    188206    },
    189207
Note: See TracChangeset for help on using the changeset viewer.