-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editorial: small cleanup after #1326 #1336
Open
saschanaz
wants to merge
2
commits into
whatwg:main
Choose a base branch
from
saschanaz:cleanup-1326
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3352,8 +3352,7 @@ The following abstract operations support the implementation of the | |
! [$ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue$](|controller|). | ||
1. [=list/For each=] |filledPullInto| of |filledPullIntos|, | ||
1. Perform ! | ||
[$ReadableByteStreamControllerCommitPullIntoDescriptor$](|controller|.[=ReadableByteStreamController/[[stream]]=], | ||
|filledPullInto|). | ||
[$ReadableByteStreamControllerCommitPullIntoDescriptor$](|stream|, |filledPullInto|). | ||
1. Otherwise, | ||
1. Assert: ! [$IsReadableStreamLocked$](|stream|) is false. | ||
1. Perform ! [$ReadableByteStreamControllerEnqueueChunkToQueue$](|controller|, | ||
|
@@ -3458,18 +3457,18 @@ The following abstract operations support the implementation of the | |
queue entry/byte length=]). | ||
1. Let |destStart| be |pullIntoDescriptor|'s [=pull-into descriptor/byte offset=] + | ||
|pullIntoDescriptor|'s [=pull-into descriptor/bytes filled=]. | ||
1. Assert: ! [$CanCopyDataBlockBytes$](|pullIntoDescriptor|'s [=pull-into descriptor/buffer=], | ||
|destStart|, |headOfQueue|'s [=readable byte stream queue entry/buffer=], | ||
1. Let |descriptorBuffer| be |pullIntoDescriptor|'s [=pull-into descriptor/buffer=]. | ||
1. Let |queueBuffer| be |headOfQueue|'s [=readable byte stream queue entry/buffer=]. | ||
1. Assert: ! [$CanCopyDataBlockBytes$](|descriptorBuffer|, |destStart|, |queueBuffer|, | ||
|headOfQueue|'s [=readable byte stream queue entry/byte offset=], |bytesToCopy|) is true. | ||
<p class="warning">If this assertion were to fail (due to a bug in this specification or | ||
its implementation), then the next step may read from or write to potentially invalid memory. | ||
The user agent should always check this assertion, and stop in an [=implementation-defined=] | ||
manner if it fails (e.g. by crashing the process, or by | ||
<a abstract-op lt="ReadableByteStreamControllerError">erroring the stream</a>). | ||
1. Perform ! [$CopyDataBlockBytes$](|pullIntoDescriptor|'s [=pull-into | ||
descriptor/buffer=].\[[ArrayBufferData]], |destStart|, | ||
|headOfQueue|'s [=readable byte stream queue entry/buffer=].\[[ArrayBufferData]], | ||
|headOfQueue|'s [=readable byte stream queue entry/byte offset=], |bytesToCopy|). | ||
1. Perform ! [$CopyDataBlockBytes$](|descriptorBuffer|.\[[ArrayBufferData]], |destStart|, | ||
|queueBuffer|.\[[ArrayBufferData]], |headOfQueue|'s [=readable byte stream queue entry/byte | ||
offset=], |bytesToCopy|). | ||
1. If |headOfQueue|'s [=readable byte stream queue entry/byte length=] is |bytesToCopy|, | ||
1. [=list/Remove=] |queue|[0]. | ||
1. Otherwise, | ||
|
@@ -3716,12 +3715,11 @@ The following abstract operations support the implementation of the | |
1. Let |stream| be |controller|.[=ReadableByteStreamController/[[stream]]=]. | ||
1. If ! [$ReadableStreamHasBYOBReader$](|stream|) is true, | ||
1. Let |filledPullIntos| be a new empty [=list=]. | ||
1. Let |i| be 0. | ||
1. [=While=] |i| < ! [$ReadableStreamGetNumReadIntoRequests$](|stream|), | ||
1. [=While=] |filledPullIntos|'s [=list/size=] < ! | ||
[$ReadableStreamGetNumReadIntoRequests$](|stream|), | ||
Comment on lines
+3718
to
+3719
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! 😁 |
||
1. Let |pullIntoDescriptor| be ! | ||
[$ReadableByteStreamControllerShiftPendingPullInto$](|controller|). | ||
1. [=list/Append=] |pullIntoDescriptor| to |filledPullIntos|. | ||
1. Set |i| to |i| + 1. | ||
1. [=list/For each=] |filledPullInto| of |filledPullIntos|, | ||
1. Perform ! [$ReadableByteStreamControllerCommitPullIntoDescriptor$](|stream|, | ||
|filledPullInto|). | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"headOfQueue's byte offset" appears both in the
CanCopyDataBlockBytes
assertion and in theCopyDataBlockBytes
call below. Should we also introduce a variable for it?