@@ -3352,8 +3352,7 @@ The following abstract operations support the implementation of the
3352
3352
! [$ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue$] (|controller|).
3353
3353
1. [=list/For each=] |filledPullInto| of |filledPullIntos|,
3354
3354
1. Perform !
3355
- [$ReadableByteStreamControllerCommitPullIntoDescriptor$] (|controller|.[=ReadableByteStreamController/[[stream]]=] ,
3356
- |filledPullInto|).
3355
+ [$ReadableByteStreamControllerCommitPullIntoDescriptor$] (|stream|, |filledPullInto|).
3357
3356
1. Otherwise,
3358
3357
1. Assert: ! [$IsReadableStreamLocked$] (|stream|) is false.
3359
3358
1. Perform ! [$ReadableByteStreamControllerEnqueueChunkToQueue$] (|controller|,
@@ -3458,18 +3457,18 @@ The following abstract operations support the implementation of the
3458
3457
queue entry/byte length=] ).
3459
3458
1. Let |destStart| be |pullIntoDescriptor|'s [=pull-into descriptor/byte offset=] +
3460
3459
|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=] ,
3463
- |headOfQueue|'s [=readable byte stream queue entry/byte offset=] , |bytesToCopy|) is true.
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. Let |queueByteOffset| be |headOfQueue|'s [=readable byte stream queue entry/byte offset=] .
3463
+ 1. Assert: ! [$CanCopyDataBlockBytes$] (|descriptorBuffer|, |destStart|, |queueBuffer|,
3464
+ |queueByteOffset|, |bytesToCopy|) is true.
3464
3465
<p class="warning"> If this assertion were to fail (due to a bug in this specification or
3465
3466
its implementation), then the next step may read from or write to potentially invalid memory.
3466
3467
The user agent should always check this assertion, and stop in an [=implementation-defined=]
3467
3468
manner if it fails (e.g. by crashing the process, or by
3468
3469
<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|).
3470
+ 1. Perform ! [$CopyDataBlockBytes$] (|descriptorBuffer|.\[[ArrayBufferData]] , |destStart|,
3471
+ |queueBuffer|.\[[ArrayBufferData]] , |queueByteOffset|, |bytesToCopy|).
3473
3472
1. If |headOfQueue|'s [=readable byte stream queue entry/byte length=] is |bytesToCopy|,
3474
3473
1. [=list/Remove=] |queue|[0] .
3475
3474
1. Otherwise,
@@ -3716,12 +3715,11 @@ The following abstract operations support the implementation of the
3716
3715
1. Let |stream| be |controller|.[=ReadableByteStreamController/[[stream]]=] .
3717
3716
1. If ! [$ReadableStreamHasBYOBReader$] (|stream|) is true,
3718
3717
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|),
3721
3720
1. Let |pullIntoDescriptor| be !
3722
3721
[$ReadableByteStreamControllerShiftPendingPullInto$] (|controller|).
3723
3722
1. [=list/Append=] |pullIntoDescriptor| to |filledPullIntos|.
3724
- 1. Set |i| to |i| + 1.
3725
3723
1. [=list/For each=] |filledPullInto| of |filledPullIntos|,
3726
3724
1. Perform ! [$ReadableByteStreamControllerCommitPullIntoDescriptor$] (|stream|,
3727
3725
|filledPullInto|).
0 commit comments