Re: [whatwg/streams] Fix typo in Close/Enqueue checks for readable byte streams (#1051)

@MattiasBuelens commented on this pull request.

Added a drive-by fix for a related check that is now redundant. (I could also move this to a separate PR, if you prefer.)

> @@ -5310,9 +5310,7 @@ side=] of [=transform streams=].
  1. Return the result of [=reacting=] to |flushPromise|:
   1. If |flushPromise| was fulfilled, then:
    1. If |readable|.\[[state]] is "`errored`", throw |readable|.\[[storedError]].
-   1. Let |readableController| be |readable|.\[[readableStreamController]].
-   1. If ! [$ReadableStreamDefaultControllerCanCloseOrEnqueue$](|readableController|) is true,
-      perform ! [$ReadableStreamDefaultControllerClose$](|readableController|).
+   1. Perform ! [$ReadableStreamDefaultControllerClose$](|readable|.\[[readableStreamController]]).

The `ReadableStreamDefaultControllerCanCloseOrEnqueue` check has become redundant, similar to [this change](https://github.com/whatwg/streams/commit/a3e482279576768a602e660e65ea453f9b19b239#diff-ec9cfa5f3f35ec1f84feb2e59686c34dL4997-R4994) in `TransformStreamDefaultControllerTerminate`.

-- 
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/1051#pullrequestreview-442711333

Received on Sunday, 5 July 2020 22:35:30 UTC