Re: [whatwg/streams] Standard text for TransformStream (#811)

ricea commented on this pull request.



> +</emu-alg>
+
+<h5 id="ts-default-source-pull" method for="TransformStreamDefaultSource">pull()</h5>
+
+<emu-alg>
+  1. Let _stream_ be *this*.[[ownerTransformStream]].
+  1. Assert: _stream_.[[backpressure]] is *true*.
+  1. Assert: _stream_.[[backpressureChangePromise]] is not *undefined*.
+  1. Perform ! TransformStreamSetBackpressure(_stream_, *false*).
+  1. Return _stream_.[[backpressureChangePromise]].
+</emu-alg>
+
+<h5 id="ts-default-source-cancel" method for="TransformStreamDefaultSource">cancel(<var>reason</var>)</h5>
+
+<emu-alg>
+  1. Perform ! TransformStreamError(*this*.[[ownerTransformStream]], _reason_).

We'd end up with TypeError('TransformStream terminated') as the storedError in the writable. This seems less desirable to me than retaining whatever was passed to cancel().

However... maybe factoring out the "bottom half" of TransformStreamDefaultControllerTerminate and TransformStreamError is the way to go. I will try it.

-- 
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/811#discussion_r146250168

Received on Monday, 23 October 2017 12:37:19 UTC