WebAssembly.compileStreaming(fetch('/404')) must error before compilation |
|||
Issue description
> WebAssembly.compileStreaming(fetch('/404'))
Uncaught (in promise) CompileError: WebAssembly.compileStreaming(): Wasm code generation disallowed by embedder
at <anonymous>:1:13
This currently throws a CompileError, implying that compilation is attempted. This should not happen!
https://github.com/WebAssembly/design/blob/master/Web.md#webassemblycompilestreaming
> If the Response [...] does not represent an ok status [...] the returned promise will be rejected with a TypeError
https://fetch.spec.whatwg.org/#ok-status
> An ok status is any status in the range 200 to 299, inclusive.
,
Apr 13 2018
,
Apr 17 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b2a818025f27b8fbeaa1b3573c9d561b9fa18214 commit b2a818025f27b8fbeaa1b3573c9d561b9fa18214 Author: Andreas Haas <ahaas@chromium.org> Date: Tue Apr 17 07:06:48 2018 [v8][wasm] Throw TypeError if Response status is not ok The WebAssembly spec [1] requires that a TypeError is thrown if the status of the Response input of streaming compilation is not ok. I added layout tests for this, and cleaned up the surrounding tests a bit. [1] https://github.com/WebAssembly/design/blob/master/Web.md#webassemblycompilestreaming R=mlippautz@chromium.org, mathias@chromium.org also-by: mathias@chromium.org Bug: chromium:832552 Change-Id: Icd50e537ab659662708274a96959eb94d7fbc554 Reviewed-on: https://chromium-review.googlesource.com/1012035 Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#551269} [modify] https://crrev.com/b2a818025f27b8fbeaa1b3573c9d561b9fa18214/third_party/WebKit/LayoutTests/http/tests/wasm/resources/load-wasm.php [modify] https://crrev.com/b2a818025f27b8fbeaa1b3573c9d561b9fa18214/third_party/WebKit/LayoutTests/http/tests/wasm_streaming/wasm_response_apis.html [modify] https://crrev.com/b2a818025f27b8fbeaa1b3573c9d561b9fa18214/third_party/WebKit/LayoutTests/http/tests/wasm_streaming/wasm_response_apis.js [modify] https://crrev.com/b2a818025f27b8fbeaa1b3573c9d561b9fa18214/third_party/blink/renderer/bindings/core/v8/v8_wasm_response_extensions.cc
,
Apr 17 2018
,
Apr 24 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mathias@chromium.org
, Apr 13 2018