Changeset 251932 in webkit


Ignore:
Timestamp:
Nov 1, 2019 12:17:10 PM (4 years ago)
Author:
Devin Rousso
Message:

Web Inspector: REGRESSION(r249831): content view is empty if a breakpoint is hit in the main resource
https://bugs.webkit.org/show_bug.cgi?id=203722
<rdar://problem/56802409>

Reviewed by Joseph Pecoraro.

  • UserInterface/Models/SourceCode.js:

(WI.SourceCode.prototype.get currentRevision):
(WI.SourceCode.prototype.revisionContentDidChange):
(WI.SourceCode.prototype._initializeCurrentRevisionIfNeeded):
(WI.SourceCode.prototype._processContent):
Don't wait to lazily clone the originalRevision and use it as the currentRevision. Some
listeners expect the currentRevision to already be set by the time this happens, so as
soon as the original revision's content is changed, clone it into the currentRevision.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r251922 r251932  
     12019-11-01  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: REGRESSION(r249831): content view is empty if a breakpoint is hit in the main resource
     4        https://bugs.webkit.org/show_bug.cgi?id=203722
     5        <rdar://problem/56802409>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * UserInterface/Models/SourceCode.js:
     10        (WI.SourceCode.prototype.get currentRevision):
     11        (WI.SourceCode.prototype.revisionContentDidChange):
     12        (WI.SourceCode.prototype._initializeCurrentRevisionIfNeeded):
     13        (WI.SourceCode.prototype._processContent):
     14        Don't wait to lazily clone the `originalRevision` and use it as the `currentRevision`. Some
     15        listeners expect the `currentRevision` to already be set by the time this happens, so as
     16        soon as the original revision's content is changed, clone it into the `currentRevision`.
     17
    1182019-11-01  Devin Rousso  <drousso@apple.com>
    219
  • trunk/Source/WebInspectorUI/UserInterface/Models/SourceCode.js

    r251024 r251932  
    179179    revisionContentDidChange(revision)
    180180    {
     181        if (revision === this._originalRevision)
     182            this._initializeCurrentRevisionIfNeeded();
     183
    181184        if (this._ignoreRevisionContentDidChangeEvent)
    182185            return;
     
    225228    {
    226229        if (this._currentRevision === this._originalRevision)
    227             this.currentRevision = this._originalRevision.copy();
     230            this._currentRevision = this._originalRevision.copy();
    228231    }
    229232
     
    249252        });
    250253        this._ignoreRevisionContentDidChangeEvent = false;
    251 
    252         this._initializeCurrentRevisionIfNeeded();
    253254
    254255        // FIXME: Returning the content in this promise is misleading. It may not be current content
Note: See TracChangeset for help on using the changeset viewer.