Re: [whatwg/streams] Remove TransformStream _readableClosed member (#782)

ricea commented on this pull request.



> @@ -919,13 +920,8 @@ class ReadableStreamDefaultController {
       throw defaultControllerBrandCheckException('close');
     }
 
-    if (this._closeRequested === true) {
-      throw new TypeError('The stream has already been closed; do not close it again!');
-    }
-
-    const state = this._controlledReadableStream._state;
-    if (state !== 'readable') {
-      throw new TypeError(`The stream (in ${state} state) is not in the readable state and cannot be closed`);
+    if (ReadableStreamDefaultControllerCanCloseOrEnqueue(this) === false) {
+      throw new TypeError('The stream is not in a state that can be closed');

Done.

-- 
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/pull/782#discussion_r137510296

Received on Thursday, 7 September 2017 11:12:52 UTC