Bug 235319

Summary: CSP: Fix returned WebAssembly error type when blocked
Product: WebKit Reporter: Patrick Griffis <pgriffis>
Component: New BugsAssignee: Patrick Griffis <pgriffis>
Status: RESOLVED FIXED    
Severity: Normal CC: clopez, darin, ews-watchlist, katherine_cheney, keith_miller, mark.lam, mkwst, msaboff, saam, tzagallo, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 235408    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
WPT: Import WebAssembly CSP tests
none
CSP: Fix returned WebAssembly error type when blocked none

Description Patrick Griffis 2022-01-18 08:14:37 PST
CSP: Fix returned WebAssembly error type when blocked
Comment 1 Patrick Griffis 2022-01-18 08:15:20 PST Comment hidden (obsolete)
Comment 2 Patrick Griffis 2022-01-18 08:16:05 PST Comment hidden (obsolete)
Comment 3 Patrick Griffis 2022-01-18 10:29:14 PST
Created attachment 449402 [details]
Patch
Comment 4 Kate Cheney 2022-01-18 12:39:56 PST
Comment on attachment 449402 [details]
Patch

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

Should imported/w3c/web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-spv-asynch.any.html and imported/w3c/web-platform-tests/content-security-policy/wasm-unsafe-eval/script-src-spv-asynch.any.serviceworker.html also be skipped?

> LayoutTests/ChangeLog:8
> +        Ignore CSP test that timesout.

nit: should be a space between times and out.
Comment 5 Darin Adler 2022-01-18 13:49:30 PST
Comment on attachment 449402 [details]
Patch

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

Looks like a good change, but a lot of tests are failing on mac-wk1, please don’t land without investigating that.

Also, this should be two patches, not as single patch.

> Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp:176
> +        return exception(createJSWebAssemblyCompileError(globalObject, vm, globalObject->webAssemblyDisabledErrorMessage()));

This should be two separate patches.

First, import the tests.

Then, add the fix and update the test results to show the newly-passing tests.

Combining the two isn’t great.
Comment 6 Patrick Griffis 2022-01-18 13:57:11 PST Comment hidden (obsolete)
Comment 7 Patrick Griffis 2022-01-18 13:59:20 PST
(In reply to Darin Adler from comment #5)
> Comment on attachment 449402 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=449402&action=review
> 
> Looks like a good change, but a lot of tests are failing on mac-wk1, please
> don’t land without investigating that.

Just no ServiceWorker there, skipped now.


> This should be two separate patches.
> 
> First, import the tests.
> 
> Then, add the fix and update the test results to show the newly-passing
> tests.
> 
> Combining the two isn’t great.


OK.
Comment 8 Patrick Griffis 2022-01-18 14:15:04 PST
Created attachment 449421 [details]
WPT: Import WebAssembly CSP tests
Comment 9 Patrick Griffis 2022-01-18 14:15:45 PST
Created attachment 449422 [details]
CSP: Fix returned WebAssembly error type when blocked
Comment 10 Patrick Griffis 2022-01-18 14:24:28 PST
(In reply to Kate Cheney from comment #4)
> Comment on attachment 449402 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=449402&action=review
> 
> Should
> imported/w3c/web-platform-tests/content-security-policy/wasm-unsafe-eval/
> script-src-spv-asynch.any.html and
> imported/w3c/web-platform-tests/content-security-policy/wasm-unsafe-eval/
> script-src-spv-asynch.any.serviceworker.html also be skipped?
> 

Indeed, added.
Comment 11 Radar WebKit Bug Importer 2022-01-25 08:15:16 PST
<rdar://problem/88024254>
Comment 12 EWS 2022-02-02 10:06:28 PST
Committed r288959 (246688@main): <https://commits.webkit.org/246688@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449421 [details].
Comment 13 Patrick Griffis 2022-02-02 10:16:53 PST
Reopening as there was a second patch.
Comment 14 EWS 2022-02-02 13:11:47 PST
Committed r288992 (246711@main): <https://commits.webkit.org/246711@main>

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