Bug 208319

Summary: Check for navigation to app-bound domain during script evaluation
Product: WebKit Reporter: Kate Cheney <katherine_cheney>
Component: WebKit Misc.Assignee: Kate Cheney <katherine_cheney>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, bfulgham, cdumez, commit-queue, dbates, ews-watchlist, japhet, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Kate Cheney 2020-02-27 08:42:37 PST
We should check for navigation to app-bound domain during script evaluation
Comment 1 Kate Cheney 2020-02-27 08:45:01 PST
<rdar://problem/57569321>
Comment 2 Kate Cheney 2020-02-27 12:07:08 PST
Created attachment 391894 [details]
Patch
Comment 3 Kate Cheney 2020-02-27 12:17:51 PST
Created attachment 391896 [details]
Patch
Comment 4 Sam Weinig 2020-02-28 17:16:07 PST
Comment on attachment 391896 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=391896&action=review

> Source/WebCore/ChangeLog:13
> +        * bindings/js/ScriptController.cpp:
> +        (WebCore::ScriptController::executeScriptInWorld):
> +        * loader/FrameLoaderClient.h:
> +        * page/Frame.cpp:
> +        (WebCore::Frame::injectUserScriptImmediately):

Please fill in the ChangeLog ensuring that you include why this change is being done, and what issue it is fixing.
Comment 5 Kate Cheney 2020-03-02 18:05:53 PST
Created attachment 392233 [details]
Patch
Comment 6 Brent Fulgham 2020-03-02 20:37:10 PST
Comment on attachment 392233 [details]
Patch

I think this looks correct based on what we discussed with Andy. Feel free to land this if the wk2 run completes successfully.
Comment 7 Brent Fulgham 2020-03-02 20:38:21 PST
Comment on attachment 392233 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=392233&action=review

> Source/WebKit/ChangeLog:56
> +        (WebKit::WebPage::runJavaScript):

So much state threading! :-D
Comment 8 Kate Cheney 2020-03-03 08:18:35 PST
Thanks for the review! Looks like all EWS are green. Style bot seems to always complain when adding a new function to FrameLoaderClient.h
Comment 9 WebKit Commit Bot 2020-03-03 09:08:17 PST
Comment on attachment 392233 [details]
Patch

Clearing flags on attachment: 392233

Committed r257780: <https://trac.webkit.org/changeset/257780>
Comment 10 WebKit Commit Bot 2020-03-03 09:08:19 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2020-03-03 09:09:17 PST
<rdar://problem/59998428>