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

tyoshino approved 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');

can be closed -> permits close?

-- 
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#pullrequestreview-60857702

Received on Wednesday, 6 September 2017 09:53:16 UTC