Bug 235319 - CSP: Fix returned WebAssembly error type when blocked
Summary: CSP: Fix returned WebAssembly error type when blocked
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: Patrick Griffis
URL:
Keywords: InRadar
Depends on:
Blocks: 235408
  Show dependency treegraph
 
Reported: 2022-01-18 08:14 PST by Patrick Griffis
Modified: 2022-02-02 13:11 PST (History)
12 users (show)

See Also:


Attachments
Patch (111.49 KB, patch)
2022-01-18 08:15 PST, Patrick Griffis
no flags Details | Formatted Diff | Diff
Patch (111.55 KB, patch)
2022-01-18 08:16 PST, Patrick Griffis
no flags Details | Formatted Diff | Diff
Patch (116.49 KB, patch)
2022-01-18 10:29 PST, Patrick Griffis
no flags Details | Formatted Diff | Diff
Patch (118.97 KB, patch)
2022-01-18 13:57 PST, Patrick Griffis
no flags Details | Formatted Diff | Diff
WPT: Import WebAssembly CSP tests (111.30 KB, patch)
2022-01-18 14:15 PST, Patrick Griffis
no flags Details | Formatted Diff | Diff
CSP: Fix returned WebAssembly error type when blocked (24.66 KB, patch)
2022-01-18 14:15 PST, Patrick Griffis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].