- From: Takeshi Yoshino <notifications@github.com>
- Date: Tue, 17 Oct 2017 06:12:29 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/streams/pull/811/review/69875549@github.com>
tyoshino commented on this pull request.
> +
+ The second and third arguments to the constructor are the <a>queuing strategy</a> objects for the writable and
+ readable sides respectively. These are used in the construction of the {{WritableStream}} and {{ReadableStream}}
+ objects and can be used to add buffering to a {{TransformStream}}, in order to smooth out variations in the speed of
+ the transformation, or to increase the amount of buffering in a <a>pipe</a>.
+</div>
+
+<emu-alg>
+ 1. Set *this*.[[transformer]] to _transformer_.
+ 1. Set *this*.[[transformStreamController]] to *undefined*.
+ 1. Set *this*.[[backpressure]] and *this*.[[backpressureChangePromise]] to *undefined*.
+ 1. Let _readableType_ be ? GetV(_transformer_, `"readableType"`).
+ 1. If _readableType_ is not *undefined*, throw a *RangeError* exception.
+ 1. Let _writableType_ be ? GetV(_transformer_, `"writableType"`).
+ 1. If _writableType_ is not *undefined*, throw a *RangeError* exception.
+ 1. Let _controller_ be ? Construct(`<a idl>TransformStreamDefaultController</a>`, « *this* »).
extra space between be and ?
> + 1. Set *this*.[[transformStreamController]] to *undefined*.
+ 1. Set *this*.[[backpressure]] and *this*.[[backpressureChangePromise]] to *undefined*.
+ 1. Let _readableType_ be ? GetV(_transformer_, `"readableType"`).
+ 1. If _readableType_ is not *undefined*, throw a *RangeError* exception.
+ 1. Let _writableType_ be ? GetV(_transformer_, `"writableType"`).
+ 1. If _writableType_ is not *undefined*, throw a *RangeError* exception.
+ 1. Let _controller_ be ? Construct(`<a idl>TransformStreamDefaultController</a>`, « *this* »).
+ 1. Set *this*.[[transformStreamController]] to _controller_.
+ 1. Let _startPromise_ be <a>a new promise</a>.
+ 1. Let _source_ be ! Construct(`<a idl>TransformStreamDefaultSource</a>`, « *this*, _startPromise_ »).
+ 1. Let _readableStrategy_ be ! ObjectCreate(<a>%ObjectProperty%</a>).
+ 1. Perform ! CreateDataProperty(_readableStrategy_, `"size"`, _size_).
+ 1. Perform ! CreateDataProperty(_readableStrategy_, `"highWaterMark"`, _highWaterMark_).
+ 1. Set *this*.[[readable]] to ? Construct(`<a idl>ReadableStream</a>`, « _source_, _readableStrategy_ »).
+ 1. Let _sink_ be ! Construct(`<a idl>TransformStreamDefaultSink</a>`, « *this*, _startPromise_ »).
+ 1. Set *this*.[[writable]] to ? Construct(`<a idl>WritableStream</a>`, « _sink_, _writableStrategy_ »).
missing _writableStrategy_ creation
--
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#pullrequestreview-69875549
Received on Tuesday, 17 October 2017 13:12:55 UTC