Title: [287346] trunk/Source/WebInspectorUI
Revision
287346
Author
[email protected]
Date
2021-12-21 21:17:13 -0800 (Tue, 21 Dec 2021)

Log Message

Web Inspector: Assertion Failed removing subview in ContentViewContainer.prototype._disassociateFromContentView
https://bugs.webkit.org/show_bug.cgi?id=234572

Reviewed by Devin Rousso.

r283859 accidentally removed the checks that a content view is attached before attempting to remove it, leading
to an assertion.

* UserInterface/Views/ContentViewContainer.js:
(WI.ContentViewContainer.prototype._disassociateFromContentView):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (287345 => 287346)


--- trunk/Source/WebInspectorUI/ChangeLog	2021-12-22 05:15:33 UTC (rev 287345)
+++ trunk/Source/WebInspectorUI/ChangeLog	2021-12-22 05:17:13 UTC (rev 287346)
@@ -1,5 +1,18 @@
 2021-12-21  Patrick Angle  <[email protected]>
 
+        Web Inspector: Assertion Failed removing subview in ContentViewContainer.prototype._disassociateFromContentView
+        https://bugs.webkit.org/show_bug.cgi?id=234572
+
+        Reviewed by Devin Rousso.
+
+        r283859 accidentally removed the checks that a content view is attached before attempting to remove it, leading
+        to an assertion.
+
+        * UserInterface/Views/ContentViewContainer.js:
+        (WI.ContentViewContainer.prototype._disassociateFromContentView):
+
+2021-12-21  Patrick Angle  <[email protected]>
+
         Web Inspector: Assertion Failed adding event listener in CSSPropertyNameCompletions.prototype._updateValuesWithLatestCSSVariablesIfNeeded
         https://bugs.webkit.org/show_bug.cgi?id=234570
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js (287345 => 287346)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js	2021-12-22 05:15:33 UTC (rev 287345)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js	2021-12-22 05:17:13 UTC (rev 287346)
@@ -421,11 +421,14 @@
             return;
         }
 
-        // Hidden/non-visible extension tabs must remain attached to the DOM to avoid reloading.
-        if (contentView.constructor.shouldNotRemoveFromDOMWhenHidden() && !contentView.visible)
-            return;
+        if (contentView.constructor.shouldNotRemoveFromDOMWhenHidden()) {
+            // Hidden/non-visible extension tabs must remain attached to the DOM to avoid reloading.
+            if (!contentView.visible)
+                return;
 
-        this.removeSubview(contentView);
+            if (contentView.isAttached)
+                this.removeSubview(contentView);
+        }
 
         console.assert(!contentView.isAttached);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to