Uncaught Exception in Web Inspector. Steps to Reproduce: 1. inspect any page 2. Develop > Start Element Selection (⇧⌘C) => element selection doesn't turn on 3. open Web Inspector through some other method => uncaught exception shown 4. Develop > Start Element Selection (⇧⌘C) => element selection turns on as expected I think this is a regression from r251227 because the connection to the actual `WebCore::Page` target hasn't been established yet, meaning that the `WI.mainTarget` is actually the `WI.MultiplexingBackendTarget`. Uncaught Exceptions: ----------------------- - undefined is not an object (evaluating 'target.DOMAgent.setInspectModeEnabled') (at DOMManager.js:589:24) inspectModeEnabled @ DOMManager.js:589:24 setElementSelectionEnabled @ InspectorFrontendAPI.js:74:22 dispatch @ InspectorFrontendAPI.js:174:54 loadCompleted @ InspectorFrontendAPI.js:182:42 ? @ Main.js:533:43 promiseReactionJob @ [native code] ----------------------- Notes: Inspected URL: (unknown) Loading completed: true Frontend User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko)
Created attachment 385469 [details] Patch
Comment on attachment 385469 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=385469&action=review r=me > Source/WebInspectorUI/ChangeLog:22 > + * UserInterface/Base/Main.js: > + Drive-by: remove duplicate function `WI._toggleInspectMode` as it already exists. !! How did a linter not catch this?
Comment on attachment 385469 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=385469&action=review >> Source/WebInspectorUI/ChangeLog:22 >> + Drive-by: remove duplicate function `WI._toggleInspectMode` as it already exists. > > !! How did a linter not catch this? As we discussed in person, it’s not a function on a class or a variable in a scope, so it’s not as easily statically analyzable :(
Comment on attachment 385469 [details] Patch Clearing flags on attachment: 385469 Committed r253421: <https://trac.webkit.org/changeset/253421>
All reviewed patches have been landed. Closing bug.
<rdar://problem/57869541>