Title: [215422] trunk/Source/WebInspectorUI
Revision
215422
Author
mattba...@apple.com
Date
2017-04-17 12:30:55 -0700 (Mon, 17 Apr 2017)

Log Message

Web Inspector: XHR breakpoints restored from settings do not appear in the sidebar
https://bugs.webkit.org/show_bug.cgi?id=170890

Reviewed by Joseph Pecoraro.

Need to check for existing breakpoints when XHRBreakpointTreeController
is constructed, instead of just listening for added breakpoints.

* UserInterface/Controllers/XHRBreakpointTreeController.js:
(WebInspector.XHRBreakpointTreeController):
(WebInspector.XHRBreakpointTreeController.prototype._xhrBreakpointAdded):
(WebInspector.XHRBreakpointTreeController.prototype._addTreeElement):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (215421 => 215422)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-04-17 19:26:29 UTC (rev 215421)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-04-17 19:30:55 UTC (rev 215422)
@@ -1,3 +1,18 @@
+2017-04-17  Matt Baker  <mattba...@apple.com>
+
+        Web Inspector: XHR breakpoints restored from settings do not appear in the sidebar
+        https://bugs.webkit.org/show_bug.cgi?id=170890
+
+        Reviewed by Joseph Pecoraro.
+
+        Need to check for existing breakpoints when XHRBreakpointTreeController
+        is constructed, instead of just listening for added breakpoints.
+
+        * UserInterface/Controllers/XHRBreakpointTreeController.js:
+        (WebInspector.XHRBreakpointTreeController):
+        (WebInspector.XHRBreakpointTreeController.prototype._xhrBreakpointAdded):
+        (WebInspector.XHRBreakpointTreeController.prototype._addTreeElement):
+
 2017-04-14  Nikita Vasilyev  <nvasil...@apple.com>
 
         Web Inspector: WebSockets: messages with non-latin letters are displayed incorrectly

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/XHRBreakpointTreeController.js (215421 => 215422)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/XHRBreakpointTreeController.js	2017-04-17 19:26:29 UTC (rev 215421)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/XHRBreakpointTreeController.js	2017-04-17 19:30:55 UTC (rev 215422)
@@ -39,6 +39,9 @@
         this._allReqestsBreakpointTreeElement = new WebInspector.XHRBreakpointTreeElement(WebInspector.domDebuggerManager.allRequestsBreakpoint, WebInspector.DebuggerSidebarPanel.AssertionIconStyleClassName, WebInspector.UIString("All Requests"));
 
         this._treeOutline.appendChild(this._allReqestsBreakpointTreeElement);
+
+        for (let breakpoint of WebInspector.domDebuggerManager.xhrBreakpoints)
+            this._addTreeElement(breakpoint);
     }
 
     // Public
@@ -62,13 +65,7 @@
 
     _xhrBreakpointAdded(event)
     {
-        let breakpoint = event.data.breakpoint;
-        let treeElement = this._treeOutline.findTreeElement(breakpoint);
-        console.assert(!treeElement);
-        if (treeElement)
-            return;
-
-        this._treeOutline.appendChild(new WebInspector.XHRBreakpointTreeElement(breakpoint));
+        this._addTreeElement(event.data.breakpoint);
     }
 
     _xhrBreakpointRemoved(event)
@@ -89,4 +86,14 @@
         while (this._treeOutline.children.length > 1)
             this._treeOutline.removeChild(this._treeOutline.children.lastValue);
     }
+
+    _addTreeElement(breakpoint)
+    {
+        let treeElement = this._treeOutline.findTreeElement(breakpoint);
+        console.assert(!treeElement);
+        if (treeElement)
+            return;
+
+        this._treeOutline.appendChild(new WebInspector.XHRBreakpointTreeElement(breakpoint));
+    }
 };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to