Title: [269756] trunk/Source/WebInspectorUI
Revision
269756
Author
[email protected]
Date
2020-11-12 14:52:51 -0800 (Thu, 12 Nov 2020)

Log Message

Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'target.DOMAgent.hideHighlight')
https://bugs.webkit.org/show_bug.cgi?id=218836

Reviewed by Brian Burg.

* UserInterface/Controllers/DOMManager.js:
(WI.DOMManager.prototype.hideDOMNodeHighlight):
Some views eagerly call this when `detached`, possibly even before the `WI.mainTarget` has
been established (i.e. it's still a `WI.MultiplexingBackendTarget`). Rather than add a
specific check for the `WI.mainTarget`, just iterate over `WI.targets` and check each target
since that's eventually what's going to need to be done anyways.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (269755 => 269756)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-11-12 22:49:39 UTC (rev 269755)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-11-12 22:52:51 UTC (rev 269756)
@@ -1,5 +1,19 @@
 2020-11-12  Devin Rousso  <[email protected]>
 
+        Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'target.DOMAgent.hideHighlight')
+        https://bugs.webkit.org/show_bug.cgi?id=218836
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Controllers/DOMManager.js:
+        (WI.DOMManager.prototype.hideDOMNodeHighlight):
+        Some views eagerly call this when `detached`, possibly even before the `WI.mainTarget` has
+        been established (i.e. it's still a `WI.MultiplexingBackendTarget`). Rather than add a
+        specific check for the `WI.mainTarget`, just iterate over `WI.targets` and check each target
+        since that's eventually what's going to need to be done anyways.
+
+2020-11-12  Devin Rousso  <[email protected]>
+
         Web Inspector: REGRESSION(?): Graphics: cannot click on recording icon more than once
         https://bugs.webkit.org/show_bug.cgi?id=218834
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js (269755 => 269756)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js	2020-11-12 22:49:39 UTC (rev 269755)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js	2020-11-12 22:52:51 UTC (rev 269756)
@@ -572,8 +572,10 @@
 
     hideDOMNodeHighlight()
     {
-        let target = WI.assumingMainTarget();
-        target.DOMAgent.hideHighlight();
+        for (let target of WI.targets) {
+            if (target.hasCommand("DOM.hideHighlight"))
+                target.DOMAgent.hideHighlight();
+        }
     }
 
     highlightDOMNodeForTwoSeconds(nodeId)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to