Bug 207408 - Web Inspector: injected scripts for the worlds cleared before normal are lost
Summary: Web Inspector: injected scripts for the worlds cleared before normal are lost
Status: RESOLVED DUPLICATE of bug 207232
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-07 14:30 PST by Pavel Feldman
Modified: 2020-02-07 16:55 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.17 KB, patch)
2020-02-07 15:33 PST, Pavel Feldman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 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.
Comment 1 Pavel Feldman 2020-02-07 15:33:42 PST
Created attachment 390138 [details]
Patch
Comment 2 Joseph Pecoraro 2020-02-07 15:44:53 PST
Was this addressed by bug 207232?
https://bugs.webkit.org/show_bug.cgi?id=207232
Comment 3 Pavel Feldman 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 ***