- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 30 Jun 2015 01:12:19 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Tuesday, 30 June 2015 08:12:46 UTC
> + this._closeRequested = true;
> +
> + return;
> + }
> +
> + const reader = stream._reader;
> +
> + if (reader === undefined || IsReadableByteStreamReader(reader)) {
> + CloseReadableByteStream(stream);
> + return;
> + }
> +
> + assert(IsReadableByteStreamByobReader(reader), 'reader must be ReadableByteStreamByobReader');
> +
> + if (this._pendingPullIntos.length > 0 && this._pendingPullIntos[0].bytesFilled > 0) {
> + DestroyReadableByteStreamController(this);
In all but one case, DestroyReadableByteStreamController is followed by ErrorReadableByteStream. It might be worth thinking about how to combine them into one function. If not possible, then that's fine.
---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/361/files#r33549454
Received on Tuesday, 30 June 2015 08:12:46 UTC