diff --git a/index.bs b/index.bs
index 52729a3f9..67ca070b1 100644
--- a/index.bs
+++ b/index.bs
@@ -1476,7 +1476,7 @@ value: newViewOnSameMemory, done: true } for closed streams. If the strea
: [=read-into request/error steps=], given |e|
::
1. [=Reject=] |promise| with |e|.
- 1. Perform ! [$ReadableStreamBYOBReaderRead$]([=this=], |view|, |readIntoRequest|, |options|["{{ReadableStreamBYOBReaderReadOptions/min}}"]).
+ 1. Perform ! [$ReadableStreamBYOBReaderRead$]([=this=], |view|, |options|["{{ReadableStreamBYOBReaderReadOptions/min}}"], |readIntoRequest|).
1. Return |promise|.
@@ -2581,7 +2581,7 @@ create them does not matter.
: [=read-into request/error steps=]
::
1. Set |reading| to false.
- 1. Perform ! [$ReadableStreamBYOBReaderRead$](|reader|, |view|, |readIntoRequest|, 1).
+ 1. Perform ! [$ReadableStreamBYOBReaderRead$](|reader|, |view|, 1, |readIntoRequest|).
1. Let |pull1Algorithm| be the following steps:
1. If |reading| is true,
1. Set |readAgainForBranch1| to true.
@@ -2881,8 +2881,8 @@ The following abstract operations support the implementation and manipulation of
ReadableStreamBYOBReaderRead(|reader|, |view|,
- |readIntoRequest|, |min|) performs the following steps:
+ id="readable-stream-byob-reader-read">ReadableStreamBYOBReaderRead(|reader|, |view|, |min|,
+ |readIntoRequest|) performs the following steps:
1. Let |stream| be |reader|.[=ReadableStreamGenericReader/[[stream]]=].
1. Assert: |stream| is not undefined.
@@ -2890,7 +2890,7 @@ The following abstract operations support the implementation and manipulation of
1. If |stream|.[=ReadableStream/[[state]]=] is "`errored`", perform |readIntoRequest|'s [=read-into
request/error steps=] given |stream|.[=ReadableStream/[[storedError]]=].
1. Otherwise, perform ! [$ReadableByteStreamControllerPullInto$](|stream|.[=ReadableStream/[[controller]]=],
- |view|, |readIntoRequest|, |min|).
+ |view|, |min|, |readIntoRequest|).
@@ -3570,7 +3570,7 @@ The following abstract operations support the implementation of the
ReadableByteStreamControllerPullInto(|controller|,
- |view|, |readIntoRequest|, |min|) performs the following steps:
+ |view|, |min|, |readIntoRequest|) performs the following steps:
1. Let |stream| be |controller|.[=ReadableByteStreamController/[[stream]]=].
1. Let |elementSize| be 1.
diff --git a/reference-implementation/lib/ReadableStreamBYOBReader-impl.js b/reference-implementation/lib/ReadableStreamBYOBReader-impl.js
index 05546419a..30023c817 100644
--- a/reference-implementation/lib/ReadableStreamBYOBReader-impl.js
+++ b/reference-implementation/lib/ReadableStreamBYOBReader-impl.js
@@ -51,7 +51,7 @@ class ReadableStreamBYOBReaderImpl {
closeSteps: chunk => resolvePromise(promise, { value: chunk, done: true }),
errorSteps: e => rejectPromise(promise, e)
};
- aos.ReadableStreamBYOBReaderRead(this, view, readIntoRequest, options.min);
+ aos.ReadableStreamBYOBReaderRead(this, view, options.min, readIntoRequest);
return promise;
}
diff --git a/reference-implementation/lib/abstract-ops/readable-streams.js b/reference-implementation/lib/abstract-ops/readable-streams.js
index 15d598b03..9d20ff705 100644
--- a/reference-implementation/lib/abstract-ops/readable-streams.js
+++ b/reference-implementation/lib/abstract-ops/readable-streams.js
@@ -647,7 +647,7 @@ function ReadableByteStreamTee(stream) {
reading = false;
}
};
- ReadableStreamBYOBReaderRead(reader, view, readIntoRequest, 1);
+ ReadableStreamBYOBReaderRead(reader, view, 1, readIntoRequest);
}
function pull1Algorithm() {
@@ -913,7 +913,7 @@ function ReadableStreamReaderGenericRelease(reader) {
reader._stream = undefined;
}
-function ReadableStreamBYOBReaderRead(reader, view, readIntoRequest, min) {
+function ReadableStreamBYOBReaderRead(reader, view, min, readIntoRequest) {
const stream = reader._stream;
assert(stream !== undefined);
@@ -923,7 +923,7 @@ function ReadableStreamBYOBReaderRead(reader, view, readIntoRequest, min) {
if (stream._state === 'errored') {
readIntoRequest.errorSteps(stream._storedError);
} else {
- ReadableByteStreamControllerPullInto(stream._controller, view, readIntoRequest, min);
+ ReadableByteStreamControllerPullInto(stream._controller, view, min, readIntoRequest);
}
}
@@ -1562,7 +1562,7 @@ function ReadableByteStreamControllerProcessReadRequestsUsingQueue(controller) {
}
}
-function ReadableByteStreamControllerPullInto(controller, view, readIntoRequest, min) {
+function ReadableByteStreamControllerPullInto(controller, view, min, readIntoRequest) {
const stream = controller._stream;
let elementSize = 1;