1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
denoland-deno/ext/fetch
Andreu Botella 4d6f412b0b
refactor(core): Turn the wasm_streaming_feed binding into ops (#11985)
Async WebAssembly compilation was implemented by adding two
bindings: `set_wasm_streaming_callback`, which registered a callback to
be called whenever a streaming wasm compilation was started, and
`wasm_streaming_feed`, which let the JS callback modify the state of the
v8 wasm compiler.

`set_wasm_streaming_callback` cannot currently be implemented as
anything other than a binding, but `wasm_streaming_feed` does not really
need to use anything specific to bindings, and could indeed be
implemented as one or more ops. This PR does that, resulting in a
simplification of the relevant code.

There are three operations on the state of the v8 wasm compiler that
`wasm_streaming_feed` allowed: feeding new bytes into the compiler,
letting it know that there are no more bytes coming from the network,
and aborting the compilation. This PR provides `op_wasm_streaming_feed`
to feed new bytes into the compiler, and `op_wasm_streaming_abort` to
abort the compilation. It doesn't provide an op to let v8 know that the
response is finished, but closing the resource with `Deno.core.close()`
will achieve that.
2021-09-13 14:27:54 +02:00
..
01_fetch_util.js Rename extensions/ directory to ext/ (#11643) 2021-08-11 12:27:05 +02:00
20_headers.js fiz(ext/fetch): Headers constructor error message (#11778) 2021-08-21 05:07:30 +02:00
21_formdata.js Rename extensions/ directory to ext/ (#11643) 2021-08-11 12:27:05 +02:00
22_body.js Rename extensions/ directory to ext/ (#11643) 2021-08-11 12:27:05 +02:00
22_http_client.js Rename extensions/ directory to ext/ (#11643) 2021-08-11 12:27:05 +02:00
23_request.js fix: a Request whose URL is a revoked blob URL should still fetch (#11947) 2021-09-08 11:29:21 +02:00
23_response.js Rename extensions/ directory to ext/ (#11643) 2021-08-11 12:27:05 +02:00
26_fetch.js refactor(core): Turn the wasm_streaming_feed binding into ops (#11985) 2021-09-13 14:27:54 +02:00
Cargo.toml chore: update dependencies (#11856) 2021-09-02 23:38:44 +02:00
internal.d.ts Rename extensions/ directory to ext/ (#11643) 2021-08-11 12:27:05 +02:00
lib.deno_fetch.d.ts Rename extensions/ directory to ext/ (#11643) 2021-08-11 12:27:05 +02:00
lib.rs fix: a Request whose URL is a revoked blob URL should still fetch (#11947) 2021-09-08 11:29:21 +02: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/