Re: [whatwg/streams] Returning after performing error steps in ReadableStreamBYOBReaderRead (#1091)

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