Re: [streams] Change the model for ReadableStream to have async read() (#296)

> +      return Promise.reject(
> +        new TypeError('ReadableStreamReader.prototype.closed can only be used on a ReadableStreamReader'));
> +    }
> +
> +    return this._closedPromise;
> +  }
> +
> +  cancel(reason) {
> +    if (IsReadableStreamReader(this) === false) {
> +      return Promise.reject(
> +        new TypeError('ReadableStreamReader.prototype.cancel can only be used on a ReadableStreamReader'));
> +    }
> +
> +    if (this._ownerReadableStream === undefined) {
> +      return Promise.resolve(undefined);
> +    }

Good catch, will update

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/296/files#r26481150

Received on Monday, 16 March 2015 12:54:28 UTC