Bug 238562 - CSP: WASM fails to execute after window.open
Summary: CSP: WASM fails to execute after window.open
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kate Cheney
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-30 11:29 PDT by Kate Cheney
Modified: 2022-04-01 12:28 PDT (History)
9 users (show)

See Also:


Attachments
Patch (120.02 KB, patch)
2022-03-30 11:37 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch (120.86 KB, patch)
2022-03-31 08:44 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff
[fast-cq] Patch for landing (120.86 KB, patch)
2022-04-01 10:31 PDT, Kate Cheney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kate Cheney 2022-03-30 11:29:49 PDT
CSP: WASM fails to execute after window.open
Comment 1 Kate Cheney 2022-03-30 11:37:08 PDT
Created attachment 456158 [details]
Patch
Comment 2 Kate Cheney 2022-03-30 11:37:38 PDT
rdar://90778752
Comment 3 Kate Cheney 2022-03-31 08:44:56 PDT
Created attachment 456240 [details]
Patch
Comment 4 Brent Fulgham 2022-04-01 10:24:34 PDT
Comment on attachment 456240 [details]
Patch

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

r=me. It's a shame we don't have WPT that cover this, too.

> Source/WebCore/bindings/js/ScriptController.cpp:414
> +    jsWindowProxy->window()->setEvalEnabled(value, errorMessage);

Nit: Not relevant for your patch, but I wonder if saving the identical string in every AbstractDOMWindow is good, since there is only one string used for either case (rather than a bunch of unique strings tailored to the window.
Comment 5 Kate Cheney 2022-04-01 10:28:31 PDT
(In reply to Brent Fulgham from comment #4)
> Comment on attachment 456240 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=456240&action=review
> 
> r=me. It's a shame we don't have WPT that cover this, too.
> 

Thanks for the review!

> > Source/WebCore/bindings/js/ScriptController.cpp:414
> > +    jsWindowProxy->window()->setEvalEnabled(value, errorMessage);
> 
> Nit: Not relevant for your patch, but I wonder if saving the identical
> string in every AbstractDOMWindow is good, since there is only one string
> used for either case (rather than a bunch of unique strings tailored to the
> window.

True, filed rdar://91169940.
Comment 6 Kate Cheney 2022-04-01 10:31:46 PDT
Created attachment 456371 [details]
[fast-cq] Patch for landing
Comment 7 EWS 2022-04-01 12:27:56 PDT
Committed r292229 (249131@main): <https://commits.webkit.org/249131@main>

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