Skip to content

Commit 1c5173a

Browse files
Reset minimum fill when read request becomes detached
1 parent 164699b commit 1c5173a

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

index.bs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,6 +1951,8 @@ counterparts for default controllers, as discussed in [[#rs-abstract-ops-used-by
19511951
1. If [=this=].[=ReadableByteStreamController/[[pendingPullIntos]]=] is not [=list/is empty|empty=],
19521952
1. Let |firstPendingPullInto| be [=this=].[=ReadableByteStreamController/[[pendingPullIntos]]=][0].
19531953
1. Set |firstPendingPullInto|'s [=pull-into descriptor/reader type=] to "`none`".
1954+
1. Set |firstPendingPullInto|'s [=pull-into descriptor/minimum fill=] to |firstPendingPullInto|'s
1955+
[=pull-into descriptor/element size=].
19541956
1. Set [=this=].[=ReadableByteStreamController/[[pendingPullIntos]]=] to the [=list=]
19551957
« |firstPendingPullInto| ».
19561958
</div>

reference-implementation/lib/ReadableByteStreamController-impl.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ exports.implementation = class ReadableByteStreamControllerImpl {
104104
if (this._pendingPullIntos.length > 0) {
105105
const firstPullInto = this._pendingPullIntos[0];
106106
firstPullInto.readerType = 'none';
107+
firstPullInto.minimumFill = firstPullInto.elementSize;
107108

108109
this._pendingPullIntos = [firstPullInto];
109110
}

0 commit comments

Comments
 (0)