[whatwg/streams] TransformStream: remove [[errored]] and [[storedError]] slots (#796)

They appear to be unneeded. If the TransformStream is errored, then the readable side will always be errored (or closed, but this is okay), and the writable side will always be errored or erroring.

[[storedError]] is only used in two places:

1. If enqueue() throws, to make sure we throw the first error that happened, not necessarily the one from enqueue. Since we check we aren't errored before we call enqueue, and enqueue is synchronous, I don't think it's even possible for this to be different.
2. In the rejection returned by TransformStreamDefaultSink when flush() fails, or when it succeeds but the stream was errored in the meantime.

The first can be removed and the second can use the readable sides' storedError instead.

The benefit of removing them is simplification of the spec and reduction in the amount of state needed by implementations.

-- 
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/issues/796

Received on Thursday, 14 September 2017 15:18:33 UTC