Bug 207408

Summary: Web Inspector: injected scripts for the worlds cleared before normal are lost
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web InspectorAssignee: Pavel Feldman <pfeldman>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: cdumez, dbates, ews-watchlist, inspector-bugzilla-changes, japhet, joepeck
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Pavel Feldman
Reported 2020-02-07 14:30:58 PST
This is a follow up to https://bugs.webkit.org/show_bug.cgi?id=206110, please see the discussion there. To recap, I believe there is a subtle issue here - when didClearWindowObjectInWorld is called for the User world before it is called for the Normal world, subsequent call to clear the normal world will erase this injected script from the InjectedScriptManager through m_injectedScriptManager->discardInjectedScripts(). This can either be patched via the following change to the dispatchDidClearWindowObjectsInAllWorlds (that is somewhat hacky), or via going back to instrumenting only normal worlds and iterating over the remaining worlds within agents explicitly.
Attachments
Patch (2.17 KB, patch)
2020-02-07 15:33 PST, Pavel Feldman
no flags
Pavel Feldman
Comment 1 2020-02-07 15:33:42 PST
Joseph Pecoraro
Comment 2 2020-02-07 15:44:53 PST
Pavel Feldman
Comment 3 2020-02-07 16:40:39 PST
I believe it was! I missed it, thanks! *** This bug has been marked as a duplicate of bug 207232 ***
Note You need to log in before you can comment on or make changes to this bug.