node
node copied to clipboard
stream: improve view validation on `ReadableStreamBYOBRequest.respondWithNewView()`
-
This throws if the view is zero-length when there is an active reader when using
ReadableStreamBYOBRequest.respondWithNewView()
. -
By doing that, we can get all tests passed in
wpt/streams/readable-byte-streams/bad-buffers-and-views.any.js
.
Refs: https://streams.spec.whatwg.org/#readable-byte-stream-controller-respond-with-new-view
- If state is "closed" 5.1. If view.[[ByteLength]] is not 0, throw a TypeError exception.
- Otherwise, 6.1 Assert: state is "readable". 6.2 If view.[[ByteLength]] is 0, throw a TypeError exception.
Signed-off-by: Daeyeon Jeong [email protected]
CI: https://ci.nodejs.org/job/node-test-pull-request/45886/
CI: https://ci.nodejs.org/job/node-test-pull-request/45897/
CI: https://ci.nodejs.org/job/node-test-pull-request/45909/
Rebased since test/wpt/status/streams.json
is updated in https://github.com/nodejs/node/pull/43455.
CI: https://ci.nodejs.org/job/node-test-pull-request/45991/
Commit Queue failed
- Loading data for nodejs/node/pull/44155 ✔ Done loading data for nodejs/node/pull/44155 ----------------------------------- PR info ------------------------------------ Title stream: improve view validation on `ReadableStreamBYOBRequest.respondWithNewView()` (#44155) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch daeyeon:main.webstream-220806.Sat.5609 -> nodejs:main Labels author ready, needs-ci, web streams Commits 1 - stream: improve views validation on `BYOBRequest` Committers 1 - Daeyeon Jeonghttps://github.com/nodejs/node/actions/runs/2862673144PR-URL: https://github.com/nodejs/node/pull/44155 Refs: https://streams.spec.whatwg.org/#readable-byte-stream-controller-respond-with-new-view Reviewed-By: Luigi Pinca ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/44155 Refs: https://streams.spec.whatwg.org/#readable-byte-stream-controller-respond-with-new-view Reviewed-By: Luigi Pinca -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last review: ⚠ - stream: improve views validation on `BYOBRequest` ℹ This PR was created on Sat, 06 Aug 2022 17:16:39 GMT ✔ Approvals: 1 ✔ - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/44155#pullrequestreview-1064334855 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2022-08-11T01:31:42Z: https://ci.nodejs.org/job/node-test-pull-request/45991/ - Querying data for job/node-test-pull-request/45991/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncu
Landed in 46f6d225af493adf63ab17912a916dfb843d2970
Depends on https://github.com/nodejs/node/pull/43455