Bug 210131

Summary: WKUserScripts deferred from injection are not injected if -[WKWebView _notifyUserScripts] is called early
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: WebKit APIAssignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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].