Title: [246659] trunk/Source/WebInspectorUI
Revision
246659
Author
[email protected]
Date
2019-06-20 15:52:03 -0700 (Thu, 20 Jun 2019)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (246658 => 246659)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-06-20 22:45:17 UTC (rev 246658)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-06-20 22:52:03 UTC (rev 246659)
@@ -1,5 +1,28 @@
 2019-06-20  Devin Rousso  <[email protected]>
 
+        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):
+
+2019-06-20  Devin Rousso  <[email protected]>
+
         Web Inspector: Edit -> Tag doesn't do anything for html, head, and body elements
         https://bugs.webkit.org/show_bug.cgi?id=199052
         <rdar://problem/51923906>

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js (246658 => 246659)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js	2019-06-20 22:45:17 UTC (rev 246658)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js	2019-06-20 22:52:03 UTC (rev 246659)
@@ -471,7 +471,7 @@
         return script.target.DebuggerAgent.continueToLocation({scriptId: script.id, lineNumber, columnNumber});
     }
 
-    addBreakpoint(breakpoint, shouldSpeculativelyResolve)
+    addBreakpoint(breakpoint)
     {
         console.assert(breakpoint instanceof WI.Breakpoint);
         if (!breakpoint)
@@ -492,10 +492,7 @@
 
         if (!breakpoint.disabled) {
             const specificTarget = undefined;
-            this._setBreakpoint(breakpoint, specificTarget, () => {
-                if (shouldSpeculativelyResolve)
-                    breakpoint.resolved = true;
-            });
+            this._setBreakpoint(breakpoint, specificTarget);
         }
 
         if (!this._restoringBreakpoints)
@@ -933,7 +930,7 @@
         };
     }
 
-    _setBreakpoint(breakpoint, specificTarget, callback)
+    _setBreakpoint(breakpoint, specificTarget)
     {
         console.assert(!breakpoint.disabled);
 
@@ -962,9 +959,6 @@
 
             for (let location of locations)
                 this.breakpointResolved(target, breakpointIdentifier, location);
-
-            if (typeof callback === "function")
-                callback();
         }
 
         // The breakpoint will be resolved again by calling DebuggerAgent, so mark it as unresolved.

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js (246658 => 246659)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js	2019-06-20 22:45:17 UTC (rev 246658)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js	2019-06-20 22:52:03 UTC (rev 246659)
@@ -1297,8 +1297,7 @@
         this._addBreakpointWithEditorLineInfo(breakpoint, lineInfo);
 
         this._ignoreBreakpointAddedBreakpoint = breakpoint;
-        const shouldSpeculativelyResolveBreakpoint = true;
-        WI.debuggerManager.addBreakpoint(breakpoint, shouldSpeculativelyResolveBreakpoint);
+        WI.debuggerManager.addBreakpoint(breakpoint);
         this._ignoreBreakpointAddedBreakpoint = null;
 
         // Return the more accurate location and breakpoint info.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to