summaryrefslogtreecommitdiff
path: root/ext/web/06_streams.js
AgeCommit message (Collapse)Author
2023-01-16chore: update dlint to v0.37.0 for GitHub Actions (#17295)Kenta Moriuchi
Updated third_party dlint to v0.37.0 for GitHub Actions. This PR includes following changes: * fix(prefer-primordials): Stop using array pattern assignments * fix(prefer-primordials): Stop using global intrinsics except for `SharedArrayBuffer` * feat(guard-for-in): Apply new guard-for-in rule
2023-01-15fix(core): Add `Generator` and `AsyncGenerator` to promordials (#17241)Kenta Moriuchi
2023-01-09fix(ext/web/streams): fix ReadableStream asyncIterator (#16276)Marcos Casagrande
2023-01-06perf(ext,runtime): remove using `SafeArrayIterator` from `for-of` (#17255)Kenta Moriuchi
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-20chore: Update dlint (#17031)Kenta Moriuchi
Introduces `SafeSetIterator` and `SafeMapIterator` to primordials
2022-11-15perf(runtime/spawn): collect output using `op_read_all` (#16596)Marcos Casagrande
**This patch** ``` benchmark time (avg) (min … max) p75 p99 p995 ------------------------------------------------- ----------------------------- echo deno 23.99 ms/iter (22.51 ms … 33.61 ms) 23.97 ms 33.61 ms 33.61 ms cat 16kb 24.27 ms/iter (22.5 ms … 35.21 ms) 24.2 ms 35.21 ms 35.21 ms cat 1mb 25.88 ms/iter (25.04 ms … 30.28 ms) 26.12 ms 30.28 ms 30.28 ms cat 15mb 38.41 ms/iter (35.7 ms … 50 ms) 38.31 ms 50 ms 50 ms ``` **main** ``` benchmark time (avg) (min … max) p75 p99 p995 ------------------------------------------------- ----------------------------- echo deno 35.66 ms/iter (34.53 ms … 41.84 ms) 35.79 ms 41.84 ms 41.84 ms cat 16kb 35.99 ms/iter (34.52 ms … 44.94 ms) 36.05 ms 44.94 ms 44.94 ms cat 1mb 38.68 ms/iter (36.67 ms … 50.44 ms) 37.95 ms 50.44 ms 50.44 ms cat 15mb 48.4 ms/iter (46.19 ms … 58.41 ms) 49.16 ms 58.41 ms 58.41 ms ```
2022-10-29fix(core): fix APIs not to be affected by `Promise.prototype.then` ↵Kenta Moriuchi
modification (#16326)
2022-10-26refactor(ext/streams): remove fake detached (#16431)Marcos Casagrande
Removed "fake detached" logic since it's no longer needed after [#16294](https://github.com/denoland/deno/pull/16294) landed
2022-10-26perf(ext/web): optimize transferArrayBuffer (#16294)Divy Srivastava
Avoid copying enqueued data + misc optimizations to skip webidl converter.
2022-10-25feat(ext/web): use ArrayBuffer.was_detached() (#16307)Marcos Casagrande
This PR adds a way to reliably check if an ArrayBuffer was detached
2022-10-24perf(ext/streams): fast path when consuming body of tee'd stream (#16329)Marcos Casagrande
Add a fast path for consuming the body of cloned `Request`/`Response`, which is very common specially when using `cache` API.
2022-10-14fix(ext/web/streams): enqueue to second branch before closing (#16269)Marcos Casagrande
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-10-14fix(ext/fetch): throw TypeError on non-Uint8Array chunk (#16262)Marcos Casagrande
2022-10-14fix(ext/web/streams): resolve cancelPromise in ReadableStreamTee (#16266)Marcos Casagrande
2022-10-10feat(core): add Deno.core.writeAll(rid, chunk) (#16228)Luca Casonato
This commit adds a new op_write_all to core that allows writing an entire chunk in a single async op call. Internally this calls `Resource::write_all`. The `writableStreamForRid` has been moved to `06_streams.js` now, and uses this new op. Various other code paths now also use this new op. Closes #16227
2022-10-08fix(ext/fetch): reject immediately on aborted signal (#16190)Marcos Casagrande
Enabled the following test: https://github.com/web-platform-tests/wpt/blob/edc428e8e229429acd723efc7a6d41010c94fc41/fetch/api/abort/general.any.js#L185-L201
2022-10-04perf(ext/fetch): consume body using ops (#16038)Marcos Casagrande
This commit adds a fast path to `Request` and `Response` that make consuming request bodies much faster when using `Body#text`, `Body#arrayBuffer`, and `Body#blob`, if the body is a FastStream. Because the response bodies for `fetch` are FastStream, this speeds up consuming `fetch` response bodies significantly.
2022-09-30refactor(ext/http): remove op_http_read (#16096)Luca Casonato
We can use Resource::read_return & op_read instead. This allows HTTP request bodies to participate in FastStream. To make this work, `readableStreamForRid` required a change to allow non auto-closing resources to be handled. This required some minor changes in our FastStream paths in ext/http and ext/flash.
2022-09-30fix(runtime): no FastStream for unrefable streams (#16095)Luca Casonato
2022-09-29fix(ext/fetch): `Body#bodyUsed` for static body (#16080)Marcos Casagrande
This fixes a bug where `Body#bodyUsed` incorrectly returns `false` for a body that has actually already been consumed, after `Body#body` is called.
2022-08-19perf(runtime): optimize Deno.file open & stream (#15496)Divy Srivastava
2022-08-18feat(ext/flash): An optimized http/1.1 server (#15405)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl> Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-07-18feat(unstable): Ability to ref/unref "Child" in "Deno.spawnChild()" API (#15151)Leo Kettmeir
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-05-25fix(fmt): prevent infinite loop when formatting certain binary expressions ↵David Sherret
(#14725)
2022-04-22Reland "perf(http): optimize ReadableStreams backed by a resource" (#14346)Divy Srivastava
2022-04-21Revert various PRs related to "ext/http" (#14339)Bartek Iwańczuk
* Revert "feat(ext/http): stream auto resp body compression (#14325)" * Revert "core: introduce `resource.read_return` (#14331)" * Revert "perf(http): optimize `ReadableStream`s backed by a resource (#14284)"
2022-04-20perf(http): optimize `ReadableStream`s backed by a resource (#14284)Divy Srivastava
2022-04-16refactor: update runtime code for primordial check x in y (#13642)Bartek Iwańczuk
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-03-19refactor: cleanup assert() & AssertionError definitions (#13859)Leo Kettmeir
2022-02-01refactor: primordials for instanceof (#13527)Bartek Iwańczuk
2022-01-27Revert "refactor: update runtime code for primordial checks for "instanceof" ↵Bartek Iwańczuk
(#13497)" (#13511) This reverts commit 884143218fad0e18f7553aaf079d52de703f7601.
2022-01-27refactor: update runtime code for primordial checks for "instanceof" (#13497)Bartek Iwańczuk
2022-01-14fix(streams): update TypeError message for pending reads when releasing ↵Leo Kettmeir
reader (#13376)
2022-01-14feat(streams): reject pending reads when releasing reader (#13375)Leo Kettmeir
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-12-08feat(streams): support abort reasons in streams (#12991)Andreu Botella
2021-11-08feat(ext/web): WritableStreamDefaultController.signal (#12654)Leo Kettmeir
2021-11-05BREAKING chore(ext/web): remove `ReadableStream.getIterator` (#12652)Leo Kettmeir
2021-11-03feat(ext/web): BYOB support for ReadableStream (#12616)Leo Kettmeir
This commit introduces support for BYOB readers in the WHATWG Streams API implementation.
2021-10-12chore: upgrade crates based on deno ast 0.3 (#12403)David Sherret
2021-09-25fix(ext/webidl): correctly apply [SymbolToStringTag] to interfaces (#11851)李瑞丰
Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2021-09-02feat(fmt): add basic JS doc formatting (#11902)David Sherret
2021-08-11Rename extensions/ directory to ext/ (#11643)Ryan Dahl