From bf4b3164f86e73bcd2d25cd0a3159970f6a55541 Mon Sep 17 00:00:00 2001 From: Adam Rice Date: Fri, 6 Oct 2017 21:15:43 +0900 Subject: [PATCH 1/2] Remove inaccurate note about ReadableStreamDefaultControllerEnqueue ReadableStreamDefaultControllerEnqueue has a note indicating that it could be called when the stream was closed without an exception being thrown. This hasn't been true since December 2015. Remove the inaccurate note. Fixes #824. --- index.bs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/index.bs b/index.bs index b58d9cfc2..f407296c3 100644 --- a/index.bs +++ b/index.bs @@ -1793,14 +1793,6 @@ asserts). 1. Perform ! ReadableStreamDefaultControllerCallPullIfNeeded(_controller_). -
- The case where stream.\[[state]] is "closed", but stream.\[[closeRequested]] - is false, will happen if the stream was closed without its controller's close method ever being - called: i.e., if the stream was closed by a call to {{ReadableStream/cancel(reason)}}. In this case we allow the - controller's enqueue method to be called and silently do nothing, since the cancelation was outside the - control of the underlying source. -
-

ReadableStreamDefaultControllerError ( controller, e )

From ce2f2b3eaf13608e6e7c6892f87a2cbff7929cc6 Mon Sep 17 00:00:00 2001 From: Adam Rice Date: Wed, 11 Oct 2017 18:03:58 +0900 Subject: [PATCH 2/2] Add note to ReadableStreamDefaultControllerCanCloseOrEnqueue Clarify the cases when [[closeRequested]] is false but state is not "readable". --- index.bs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.bs b/index.bs index f407296c3..6a894f662 100644 --- a/index.bs +++ b/index.bs @@ -1851,6 +1851,13 @@ nothrow>ReadableStreamDefaultControllerCanCloseOrEnqueue ( controller 1. Otherwise, return *false*. +
+ The case where stream.\[[closeRequested]] is false, but stream.\[[state]] is + not "readable", happens when the stream is errored via {{ReadableStreamDefaultController/error(e)}}, or + when it is closed without its controller's close method ever being called: e.g., if the stream was closed + by a call to {{ReadableStream/cancel(reason)}}. +
+

Class ReadableByteStreamController