mirror of
https://github.com/denoland/deno.git
synced 2024-12-27 01:29:14 -05:00
d983b577bc
`handleWasmStreaming` is the function that provides the binding with the `fetch` API needed for `WebAssembly.instantiateStreaming()` and `WebAssembly.compileStreaming()`. When I implemented it in #11200, I thought V8 was calling these functions with the argument of the `WebAssembly` streaming functions, without doing any resolving, and so `handleWasmStreaming` awaits for the parameter to resolve. However, as discovered in https://github.com/denoland/deno/issues/13917#issuecomment-1065805565, V8 does in fact resolve the parameter if it's a promise (and handles rejections arising from that). This change removes the `async` IIFE inside `handleWasmStreaming`, letting initial errors be handled synchronously (which will however not throw synchronously from the `WebAssembly` namespace functions). Awaiting is still necessary for reading the bytes of the response, though, and so there is an `async` IIFE for that. |
||
---|---|---|
.. | ||
01_fetch_util.js | ||
20_headers.js | ||
21_formdata.js | ||
22_body.js | ||
22_http_client.js | ||
23_request.js | ||
23_response.js | ||
26_fetch.js | ||
Cargo.toml | ||
fs_fetch_handler.rs | ||
internal.d.ts | ||
lib.deno_fetch.d.ts | ||
lib.rs | ||
README.md |