1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-21 23:04:45 -05:00
denoland-deno/ext/fetch
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
..
01_fetch_util.js chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
20_headers.js refactor: update runtime code for primordial check for iterators (#13510) 2022-02-07 13:54:32 +01:00
21_formdata.js refactor: primordials for instanceof (#13527) 2022-02-01 18:06:11 +01:00
22_body.js refactor: primordials for instanceof (#13527) 2022-02-01 18:06:11 +01:00
22_http_client.js refactor: primordials for instanceof (#13527) 2022-02-01 18:06:11 +01:00
23_request.js cleanup(web, fetch): dedupe minesniff / "extract a MIME type" algorithm (#14044) 2022-03-20 14:31:12 +01:00
23_response.js cleanup(web, fetch): dedupe minesniff / "extract a MIME type" algorithm (#14044) 2022-03-20 14:31:12 +01:00
26_fetch.js fix(fetch): Fix uncaught rejection panic with WebAssembly.instantiateStreaming (#13925) 2022-03-22 11:33:29 +01:00
Cargo.toml v1.20.1 2022-03-16 21:40:31 -04:00
fs_fetch_handler.rs chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
internal.d.ts chore: update copyright year (#13434) 2022-01-20 16:10:16 +09:00
lib.deno_fetch.d.ts docs(ext/fetch): fix copy-paste errors in Request docs (#13681) 2022-02-16 13:50:15 +01:00
lib.rs fix: cargo publish fails without absolute paths (#13993) 2022-03-17 01:25:44 +01:00
README.md Rename extensions/ directory to ext/ (#11643) 2021-08-11 12:27:05 +02:00

deno_fetch

This crate implements the Fetch API.

Spec: https://fetch.spec.whatwg.org/