stream: fix ReadableStreamReader.releaseLock()#44292
Merged
nodejs-github-bot merged 2 commits intonodejs:mainfrom Aug 27, 2022
Merged
stream: fix ReadableStreamReader.releaseLock()#44292nodejs-github-bot merged 2 commits intonodejs:mainfrom
ReadableStreamReader.releaseLock()#44292nodejs-github-bot merged 2 commits intonodejs:mainfrom
Conversation
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
Member
Author
|
cc @nodejs/whatwg-stream |
lpinca
approved these changes
Aug 19, 2022
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
Collaborator
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/44292
Error: [undefined] GraphQL request Error: Something went wrong while executing your query. Please include `0782:9217:273B87F:285A21E:6309E917` when reporting this issue.
at Request.query (file:///opt/hostedtoolcache/node/16.16.0/x64/lib/node_modules/node-core-utils/lib/request.js:112:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Request.queryAll (file:///opt/hostedtoolcache/node/16.16.0/x64/lib/node_modules/node-core-utils/lib/request.js:136:20)
at async Request.gql (file:///opt/hostedtoolcache/node/16.16.0/x64/lib/node_modules/node-core-utils/lib/request.js:66:22)
at async PRData.getReviews (file:///opt/hostedtoolcache/node/16.16.0/x64/lib/node_modules/node-core-utils/lib/pr_data.js:88:20)
at async Promise.all (index 1)
at async Promise.all (index 1)
at async PRData.getAll (file:///opt/hostedtoolcache/node/16.16.0/x64/lib/node_modules/node-core-utils/lib/pr_data.js:58:5)
at async getMetadata (file:///opt/hostedtoolcache/node/16.16.0/x64/lib/node_modules/node-core-utils/components/metadata.js:18:3)
at async main (file:///opt/hostedtoolcache/node/16.16.0/x64/lib/node_modules/node-core-utils/components/git/land.js:200:22) {
data: {
variables: { after: null, prid: 44292, owner: 'nodejs', repo: 'node' }
}
}https://github.com/nodejs/node/actions/runs/2938807443 |
Collaborator
|
Landed in cc75a3c |
RafaelGSS
pushed a commit
that referenced
this pull request
Sep 5, 2022
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com PR-URL: #44292 Refs: https://streams.spec.whatwg.org/#default-reader-release-lock Refs: https://streams.spec.whatwg.org/#byob-reader-release-lock Refs: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/releaseLock Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Fyko
pushed a commit
to Fyko/node
that referenced
this pull request
Sep 15, 2022
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com PR-URL: nodejs#44292 Refs: https://streams.spec.whatwg.org/#default-reader-release-lock Refs: https://streams.spec.whatwg.org/#byob-reader-release-lock Refs: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/releaseLock Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Member
|
This is breaking wpt tests. Would you mind to backport this to the v16.x release line? |
Member
Author
|
@juanarbol Thanks for preparing v16.x. Backporting this is pending for now since it depends on both #43455 and #44234. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates
ReadableStreamReader.releaseLock()behavior to meet the latest web streams compatibility.The notable change seems the following:
Attempting to
releaseLock()when a reader has pending read requests leads :releaseLock()will throw aTypeError.TypeError. Instead, promises returned by reader'sReadableStreamDefaultReader.read()are immediately rejected with aTypeError.Old version
Latest version
Refs: https://streams.spec.whatwg.org/#default-reader-release-lock
Refs: https://streams.spec.whatwg.org/#byob-reader-release-lock
Refs: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader/releaseLock
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com