Bug 210131 - WKUserScripts deferred from injection are not injected if -[WKWebView _notifyUserScripts] is called early
Summary: WKUserScripts deferred from injection are not injected if -[WKWebView _notify...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-07 10:14 PDT by Timothy Hatcher
Modified: 2020-04-07 11:37 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.78 KB, patch)
2020-04-07 11:03 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2020-04-07 10:14:46 PDT
If -[WKWebView _notifyUserScripts] is called early, before Frame::injectUserScripts() happens, pageWasNotified will still be false, allowing scripts to build up in m_userScriptsAwaitingNotification and never being injected (since -[WKWebView _notifyUserScripts] will not be called again).
Comment 1 Timothy Hatcher 2020-04-07 11:03:19 PDT
Created attachment 395710 [details]
Patch
Comment 2 Timothy Hatcher 2020-04-07 11:16:03 PDT Comment hidden (obsolete)
Comment 3 Radar WebKit Bug Importer 2020-04-07 11:16:25 PDT Comment hidden (obsolete)
Comment 4 Timothy Hatcher 2020-04-07 11:17:31 PDT
<rdar://problem/61368446>
Comment 5 EWS 2020-04-07 11:37:49 PDT
Committed r259650: <https://trac.webkit.org/changeset/259650>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395710 [details].