Re: [whatwg/streams] Refactor writable stream erroring to be centralized (#705)

tyoshino commented on this pull request.



>    stream._state = 'errored';
   stream._storedError = error;
 
-  WritableStreamRejectPromisesInReactionToError(stream);
+  // TODO: layering violation?
+  ResetQueue(stream._writableStreamController);

We can introduce an interface and have different implementations for that. Yeah, virtual method as ricea said.

WritableStreamAbort() is touching the controller but through WritableStreamDefaultControllerAbort(). It's great if you abstract it into WritableStreamDefaultControllerError() e.g.

-- 
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/705#discussion_r107872105

Received on Friday, 24 March 2017 10:22:16 UTC