Changeset 246659 in webkit


Ignore:
Timestamp:
Jun 20, 2019 3:52:03 PM (5 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Debugger: setting a breakpoint on a non-JavaScript line should immediately show as unresolved
https://bugs.webkit.org/show_bug.cgi?id=199033

Reviewed by Matt Baker.

Remove the shouldSpeculativelyResolve parameter, as it was resolving breakpoints even in
the case that there were no resolved locations for the given breakpoint.

In the case that there are resolved locations, the breakpoint would've already been resolved
by the time that shouldSpeculativelyResolve would've taken effect, so it's unnecessary.

This parameter was only used when setting a breakpoint from a SourceCodeTextEditor gutter.

  • UserInterface/Controllers/DebuggerManager.js:

(WI.DebuggerManager.prototype.addBreakpoint):
(WI.DebuggerManager.prototype._setBreakpoint):
(WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r246658 r246659  
     12019-06-20  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Debugger: setting a breakpoint on a non-JavaScript line should immediately show as unresolved
     4        https://bugs.webkit.org/show_bug.cgi?id=199033
     5
     6        Reviewed by Matt Baker.
     7
     8        Remove the `shouldSpeculativelyResolve` parameter, as it was resolving breakpoints even in
     9        the case that there were no resolved locations for the given breakpoint.
     10
     11        In the case that there are resolved locations, the breakpoint would've already been resolved
     12        by the time that `shouldSpeculativelyResolve` would've taken effect, so it's unnecessary.
     13
     14        This parameter was only used when setting a breakpoint from a `SourceCodeTextEditor` gutter.
     15
     16        * UserInterface/Controllers/DebuggerManager.js:
     17        (WI.DebuggerManager.prototype.addBreakpoint):
     18        (WI.DebuggerManager.prototype._setBreakpoint):
     19        (WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
     20
     21        * UserInterface/Views/SourceCodeTextEditor.js:
     22        (WI.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
     23
    1242019-06-20  Devin Rousso  <drousso@apple.com>
    225
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js

    r244398 r246659  
    472472    }
    473473
    474     addBreakpoint(breakpoint, shouldSpeculativelyResolve)
     474    addBreakpoint(breakpoint)
    475475    {
    476476        console.assert(breakpoint instanceof WI.Breakpoint);
     
    493493        if (!breakpoint.disabled) {
    494494            const specificTarget = undefined;
    495             this._setBreakpoint(breakpoint, specificTarget, () => {
    496                 if (shouldSpeculativelyResolve)
    497                     breakpoint.resolved = true;
    498             });
     495            this._setBreakpoint(breakpoint, specificTarget);
    499496        }
    500497
     
    934931    }
    935932
    936     _setBreakpoint(breakpoint, specificTarget, callback)
     933    _setBreakpoint(breakpoint, specificTarget)
    937934    {
    938935        console.assert(!breakpoint.disabled);
     
    963960            for (let location of locations)
    964961                this.breakpointResolved(target, breakpointIdentifier, location);
    965 
    966             if (typeof callback === "function")
    967                 callback();
    968962        }
    969963
  • trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js

    r246502 r246659  
    12981298
    12991299        this._ignoreBreakpointAddedBreakpoint = breakpoint;
    1300         const shouldSpeculativelyResolveBreakpoint = true;
    1301         WI.debuggerManager.addBreakpoint(breakpoint, shouldSpeculativelyResolveBreakpoint);
     1300        WI.debuggerManager.addBreakpoint(breakpoint);
    13021301        this._ignoreBreakpointAddedBreakpoint = null;
    13031302
Note: See TracChangeset for help on using the changeset viewer.