Changeset 269756 in webkit


Ignore:
Timestamp:
Nov 12, 2020 2:52:51 PM (3 years ago)
Author:
Devin Rousso
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.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r269755 r269756  
     12020-11-12  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'target.DOMAgent.hideHighlight')
     4        https://bugs.webkit.org/show_bug.cgi?id=218836
     5
     6        Reviewed by Brian Burg.
     7
     8        * UserInterface/Controllers/DOMManager.js:
     9        (WI.DOMManager.prototype.hideDOMNodeHighlight):
     10        Some views eagerly call this when `detached`, possibly even before the `WI.mainTarget` has
     11        been established (i.e. it's still a `WI.MultiplexingBackendTarget`). Rather than add a
     12        specific check for the `WI.mainTarget`, just iterate over `WI.targets` and check each target
     13        since that's eventually what's going to need to be done anyways.
     14
    1152020-11-12  Devin Rousso  <drousso@apple.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/DOMManager.js

    r267998 r269756  
    573573    hideDOMNodeHighlight()
    574574    {
    575         let target = WI.assumingMainTarget();
    576         target.DOMAgent.hideHighlight();
     575        for (let target of WI.targets) {
     576            if (target.hasCommand("DOM.hideHighlight"))
     577                target.DOMAgent.hideHighlight();
     578        }
    577579    }
    578580
Note: See TracChangeset for help on using the changeset viewer.