0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00
deno/ext
Andreu Botella 12d28dffc6
fix(fetch): Fix uncaught rejection panic with WebAssembly.instantiateStreaming (#13925)
When an exception is thrown during the processing of streaming WebAssembly,
`op_wasm_streaming_abort` is called. This op calls into V8, which synchronously
rejects the promise and calls into the promise rejection handler, if applicable.
But calling an op borrows the isolate's `JsRuntimeState` for the duration of the
op, which means it is borrowed when V8 calls into `promise_reject_callback`,
which tries to borrow it again, panicking.

This change changes `op_wasm_streaming_abort` from an op to a binding
(`Deno.core.abortWasmStreaming`). Although that binding must borrow the
`JsRuntimeState` in order to access the `WasmStreamingResource` stored in the
`OpTable`, it also takes ownership of that `WasmStreamingResource` instance,
which means it can drop any borrows of the `JsRuntimeState` before calling into
V8.
2022-03-22 11:33:29 +01:00
..
broadcast_channel v1.20.1 2022-03-16 21:40:31 -04:00
console fix(ext/console): fix error with a Proxy of a Map (#14032) 2022-03-20 20:21:42 +09:00
crypto v1.20.1 2022-03-16 21:40:31 -04:00
fetch fix(fetch): Fix uncaught rejection panic with WebAssembly.instantiateStreaming (#13925) 2022-03-22 11:33:29 +01:00
ffi v1.20.1 2022-03-16 21:40:31 -04:00
http perf(http): avoid per header alloc (#14051) 2022-03-21 12:56:30 +01:00
net chore(core,ext): minor JS optimisations (#13950) 2022-03-19 18:26:54 +09:00
tls v1.20.1 2022-03-16 21:40:31 -04:00
url v1.20.1 2022-03-16 21:40:31 -04:00
web cleanup(web, fetch): dedupe minesniff / "extract a MIME type" algorithm (#14044) 2022-03-20 14:31:12 +01:00
webgpu v1.20.1 2022-03-16 21:40:31 -04:00
webidl chore(core,ext): minor JS optimisations (#13950) 2022-03-19 18:26:54 +09:00
websocket v1.20.1 2022-03-16 21:40:31 -04:00
webstorage v1.20.1 2022-03-16 21:40:31 -04:00