Title: [267546] trunk/Source/WebInspectorUI
Revision
267546
Author
nvasil...@apple.com
Date
2020-09-24 14:47:43 -0700 (Thu, 24 Sep 2020)

Log Message

REGRESSION(r267379): Web Inspector: Sources navigation sidebar is empty every other time it's selected
https://bugs.webkit.org/show_bug.cgi?id=216942
<rdar://problem/69520398>

Reviewed by Brian Burg.

* UserInterface/Views/Sidebar.js:
(WI.Sidebar.prototype.insertSidebarPanel):
insertSidebarPanel was exiting early when sidebarPanel.parentSidebar matched the current sidebar,
creating a state when `this._sidebarPanels` is an empty array.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (267545 => 267546)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-09-24 21:36:45 UTC (rev 267545)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-09-24 21:47:43 UTC (rev 267546)
@@ -1,3 +1,16 @@
+2020-09-24  Nikita Vasilyev  <nvasil...@apple.com>
+
+        REGRESSION(r267379): Web Inspector: Sources navigation sidebar is empty every other time it's selected
+        https://bugs.webkit.org/show_bug.cgi?id=216942
+        <rdar://problem/69520398>
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Views/Sidebar.js:
+        (WI.Sidebar.prototype.insertSidebarPanel):
+        insertSidebarPanel was exiting early when sidebarPanel.parentSidebar matched the current sidebar,
+        creating a state when `this._sidebarPanels` is an empty array.
+
 2020-09-22  Brian Burg  <bb...@apple.com>
 
         [Cocoa] _WKInspectorDelegate should handle showing external resources

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js (267545 => 267546)


--- trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js	2020-09-24 21:36:45 UTC (rev 267545)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Sidebar.js	2020-09-24 21:47:43 UTC (rev 267546)
@@ -72,9 +72,10 @@
         if (!(sidebarPanel instanceof WI.SidebarPanel))
             return;
 
-        console.assert(!sidebarPanel.parentSidebar);
-        if (sidebarPanel.parentSidebar)
+        if (sidebarPanel.parentSidebar && sidebarPanel.parentSidebar !== this) {
+            console.assert(false, "Failed to insert sidebar panel", sidebarPanel);
             return;
+        }
 
         console.assert(index >= 0 && index <= this._sidebarPanels.length);
         this._sidebarPanels.splice(index, 0, sidebarPanel);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to