lib: allow byob reader for 'blob.stream()'#49713
Merged
nodejs-github-bot merged 3 commits intonodejs:mainfrom Sep 22, 2023
Merged
lib: allow byob reader for 'blob.stream()'#49713nodejs-github-bot merged 3 commits intonodejs:mainfrom
nodejs-github-bot merged 3 commits intonodejs:mainfrom
Conversation
debadree25
commented
Sep 19, 2023
| // hit the flow rate of the stream (c.desiredSize). | ||
| queueMicrotask(() => { | ||
| if (c.desiredSize <= 0) { | ||
| if (c.desiredSize < 0) { |
Member
Author
There was a problem hiding this comment.
Would draw attention of reviewers to this specific update it seems when we turn this into a ReadableByteStream the high water mark for bytestreams is 0 and for normal default streams is 1 hence we have to remove the equality here
see:
node/lib/internal/webstreams/readablestream.js
Lines 282 to 298 in 2ccfb23
also each byte is considered to be an element in the case of byte streams and hence the desiredSize can go below 0, I nonetheless asserted that the memory isnt overflowing in the existing tests but do take a look at them too if they look correct!
Thank You!
Member
Author
|
cc @nodejs/whatwg-stream |
Collaborator
This was referenced Sep 20, 2023
Collaborator
benjamingr
approved these changes
Sep 21, 2023
Collaborator
17 tasks
Collaborator
|
Landed in 23a3410 |
20 tasks
ruyadorno
pushed a commit
that referenced
this pull request
Sep 28, 2023
Fixes: #47993 PR-URL: #49713 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Closed
Merged
alexfernandez
pushed a commit
to alexfernandez/node
that referenced
this pull request
Nov 1, 2023
Fixes: nodejs#47993 PR-URL: nodejs#49713 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
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.
Fixes: #47993