1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 01:29:14 -05:00
denoland-deno/ext/fetch
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
..
01_fetch_util.js chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
20_headers.js chore(ext): fix typo in ext/webgpu, ext/fetch (#14106) 2022-03-25 00:36:30 +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 chore(ext): fix typo in ext/webgpu, ext/fetch (#14106) 2022-03-25 00:36:30 +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 chore(wasm): Don't await on the argument to handleWasmStreaming (#14000) 2022-03-29 14:44:33 +02:00
Cargo.toml chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01: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 fix(ext/fetch): extend deprecated fetch() overload with string | Request (#14134) 2022-03-28 12:35:48 +02: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/