- From: Adam Rice <notifications@github.com>
- Date: Thu, 06 Apr 2017 07:55:16 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 6 April 2017 14:56:54 UTC
ricea commented on this pull request.
> - WritableStreamRejectAbortRequestIfPending(stream);
- WritableStreamRejectPromisesInReactionToError(stream);
+function WritableStreamFinishError(stream) {
+ assert(stream._state === 'erroring', 'stream._state === erroring');
+ assert(WritableStreamHasOperationMarkedInFlight(stream) === false,
+ 'WritableStreamHasOperationMarkedInFlight(stream) === false');
+ stream._state = 'errored';
+ stream._writableStreamController[ErrorSteps]();
+
+ const storedError = stream._storedError;
+ for (const writeRequest of stream._writeRequests) {
+ writeRequest._reject(storedError);
+ }
+ stream._writeRequests = [];
+
+ if (stream._pendingAbortRequest === undefined) {
Good catch. It was indeed broken. I have fixed it. PTAL.
--
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/721#discussion_r110183706
Received on Thursday, 6 April 2017 14:56:54 UTC