1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00
denoland-deno/ext
Andreu Botella d983b577bc
chore(wasm): Don't await on the argument to handleWasmStreaming (#14000)
`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.
2022-03-29 14:44:33 +02:00
..
broadcast_channel chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
console chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
crypto chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
fetch chore(wasm): Don't await on the argument to handleWasmStreaming (#14000) 2022-03-29 14:44:33 +02:00
ffi chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
http chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
net chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
tls chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
url chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
web chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
webgpu chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
webidl chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
websocket chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
webstorage chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00