- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 01 Dec 2020 08:55:43 -0800
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 1 December 2020 16:55:55 UTC
Great catch! I think we should hide the last step, i.e.
> Return ! ReadableByteStreamControllerPullInto(stream.[[controller]], view, readIntoRequest).
behind an "Otherwise", like is done in ReadableStreamDefaultReaderRead right below.
The reference implementation already contains the corresponding `else`, which is why it passes the WPTs:
```js
function ReadableStreamBYOBReaderRead(reader, view, readIntoRequest) {
const stream = reader._stream;
assert(stream !== undefined);
stream._disturbed = true;
if (stream._state === 'errored') {
readIntoRequest.errorSteps(stream._storedError);
} else {
ReadableByteStreamControllerPullInto(stream._controller, view, readIntoRequest);
}
}
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1091#issuecomment-736680485
Received on Tuesday, 1 December 2020 16:55:55 UTC