Title: [265714] trunk/Source/WebInspectorUI
Revision
265714
Author
[email protected]
Date
2020-08-14 16:09:54 -0700 (Fri, 14 Aug 2020)

Log Message

Web Inspector: Assertion Failed: removeEventListener cannot remove css-manager-style-sheet-added because it doesn't exist.
https://bugs.webkit.org/show_bug.cgi?id=215495

Reviewed by Joseph Pecoraro.

* UserInterface/Views/FrameTreeElement.js:
(WI.FrameTreeElement.prototype.ondetach):
Check `this.listItemElement`, which is equivalent to `WI.View.prototype.didInitialLayout` for `WI.TreeElement`.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (265713 => 265714)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-08-14 22:54:08 UTC (rev 265713)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-08-14 23:09:54 UTC (rev 265714)
@@ -1,5 +1,16 @@
 2020-08-14  Devin Rousso  <[email protected]>
 
+        Web Inspector: Assertion Failed: removeEventListener cannot remove css-manager-style-sheet-added because it doesn't exist.
+        https://bugs.webkit.org/show_bug.cgi?id=215495
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/FrameTreeElement.js:
+        (WI.FrameTreeElement.prototype.ondetach):
+        Check `this.listItemElement`, which is equivalent to `WI.View.prototype.didInitialLayout` for `WI.TreeElement`.
+
+2020-08-14  Devin Rousso  <[email protected]>
+
         Web Inspector: Assertion Failed: removeEventListener cannot remove frame-main-resource-did-change because it doesn't exist.
         https://bugs.webkit.org/show_bug.cgi?id=215496
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js (265713 => 265714)


--- trunk/Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js	2020-08-14 22:54:08 UTC (rev 265713)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FrameTreeElement.js	2020-08-14 23:09:54 UTC (rev 265714)
@@ -121,8 +121,10 @@
 
     ondetach()
     {
-        WI.cssManager.removeEventListener(WI.CSSManager.Event.StyleSheetAdded, this._styleSheetAdded, this);
-        WI.cssManager.removeEventListener(WI.CSSManager.Event.StyleSheetRemoved, this._styleSheetRemoved, this);
+        if (this.listItemElement) {
+            WI.cssManager.removeEventListener(WI.CSSManager.Event.StyleSheetAdded, this._styleSheetAdded, this);
+            WI.cssManager.removeEventListener(WI.CSSManager.Event.StyleSheetRemoved, this._styleSheetRemoved, this);
+        }
 
         super.ondetach();
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to