Skip to content

Commit 7d14024

Browse files
committed
Editorial: small cleanup after whatwg#1326
1 parent fa4891a commit 7d14024

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

index.bs

+9-11
Original file line numberDiff line numberDiff line change
@@ -3352,8 +3352,7 @@ The following abstract operations support the implementation of the
33523352
! [$ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue$](|controller|).
33533353
1. [=list/For each=] |filledPullInto| of |filledPullIntos|,
33543354
1. Perform !
3355-
[$ReadableByteStreamControllerCommitPullIntoDescriptor$](|controller|.[=ReadableByteStreamController/[[stream]]=],
3356-
|filledPullInto|).
3355+
[$ReadableByteStreamControllerCommitPullIntoDescriptor$](|stream|, |filledPullInto|).
33573356
1. Otherwise,
33583357
1. Assert: ! [$IsReadableStreamLocked$](|stream|) is false.
33593358
1. Perform ! [$ReadableByteStreamControllerEnqueueChunkToQueue$](|controller|,
@@ -3458,18 +3457,18 @@ The following abstract operations support the implementation of the
34583457
queue entry/byte length=]).
34593458
1. Let |destStart| be |pullIntoDescriptor|'s [=pull-into descriptor/byte offset=] +
34603459
|pullIntoDescriptor|'s [=pull-into descriptor/bytes filled=].
3461-
1. Assert: ! [$CanCopyDataBlockBytes$](|pullIntoDescriptor|'s [=pull-into descriptor/buffer=],
3462-
|destStart|, |headOfQueue|'s [=readable byte stream queue entry/buffer=],
3460+
1. Let |descriptorBuffer| be |pullIntoDescriptor|'s [=pull-into descriptor/buffer=].
3461+
1. Let |queueBuffer| be |headOfQueue|'s [=readable byte stream queue entry/buffer=].
3462+
1. Assert: ! [$CanCopyDataBlockBytes$](|descriptorBuffer|, |destStart|, |queueBuffer|,
34633463
|headOfQueue|'s [=readable byte stream queue entry/byte offset=], |bytesToCopy|) is true.
34643464
<p class="warning">If this assertion were to fail (due to a bug in this specification or
34653465
its implementation), then the next step may read from or write to potentially invalid memory.
34663466
The user agent should always check this assertion, and stop in an [=implementation-defined=]
34673467
manner if it fails (e.g. by crashing the process, or by
34683468
<a abstract-op lt="ReadableByteStreamControllerError">erroring the stream</a>).
3469-
1. Perform ! [$CopyDataBlockBytes$](|pullIntoDescriptor|'s [=pull-into
3470-
descriptor/buffer=].\[[ArrayBufferData]], |destStart|,
3471-
|headOfQueue|'s [=readable byte stream queue entry/buffer=].\[[ArrayBufferData]],
3472-
|headOfQueue|'s [=readable byte stream queue entry/byte offset=], |bytesToCopy|).
3469+
1. Perform ! [$CopyDataBlockBytes$](|descriptorBuffer|.\[[ArrayBufferData]], |destStart|,
3470+
|queueBuffer|.\[[ArrayBufferData]], |headOfQueue|'s [=readable byte stream queue entry/byte
3471+
offset=], |bytesToCopy|).
34733472
1. If |headOfQueue|'s [=readable byte stream queue entry/byte length=] is |bytesToCopy|,
34743473
1. [=list/Remove=] |queue|[0].
34753474
1. Otherwise,
@@ -3716,12 +3715,11 @@ The following abstract operations support the implementation of the
37163715
1. Let |stream| be |controller|.[=ReadableByteStreamController/[[stream]]=].
37173716
1. If ! [$ReadableStreamHasBYOBReader$](|stream|) is true,
37183717
1. Let |filledPullIntos| be a new empty [=list=].
3719-
1. Let |i| be 0.
3720-
1. [=While=] |i| < ! [$ReadableStreamGetNumReadIntoRequests$](|stream|),
3718+
1. [=While=] |filledPullIntos|'s [=list/size=] < !
3719+
[$ReadableStreamGetNumReadIntoRequests$](|stream|),
37213720
1. Let |pullIntoDescriptor| be !
37223721
[$ReadableByteStreamControllerShiftPendingPullInto$](|controller|).
37233722
1. [=list/Append=] |pullIntoDescriptor| to |filledPullIntos|.
3724-
1. Set |i| to |i| + 1.
37253723
1. [=list/For each=] |filledPullInto| of |filledPullIntos|,
37263724
1. Perform ! [$ReadableByteStreamControllerCommitPullIntoDescriptor$](|stream|,
37273725
|filledPullInto|).

0 commit comments

Comments
 (0)