@@ -11,7 +11,7 @@ Opaque Elements: emu-alg
11
11
</pre>
12
12
13
13
<pre class=link-defaults>
14
- spec:promises-guide ; type:dfn;
14
+ spec:webidl ; type:dfn;
15
15
text:resolve
16
16
</pre>
17
17
@@ -863,8 +863,8 @@ prototype, are created with the internal slots described in the following table:
863
863
1. If ! IsReadableStreamAsyncIterator(*this*) is *false*, return <a>a promise rejected with</a> a *TypeError* exception.
864
864
1. Let _reader_ be *this*.[[asyncIteratorReader]] .
865
865
1. If _reader_.[[ownerReadableStream]] is *undefined*, return <a>a promise rejected with</a> a *TypeError* exception.
866
- 1. Return the result of <a>transforming </a> ! ReadableStreamDefaultReaderRead(_reader_) with a fulfillment handler
867
- which takes the argument _result_ and performs the following steps :
866
+ 1. Return the result of <a>reacting </a> to ! ReadableStreamDefaultReaderRead(_reader_) with the following fulfillment
867
+ steps given the argument _result_:
868
868
1. Assert: Type(_result_) is Object.
869
869
1. Let _done_ be ! Get(_result_, `"done"`).
870
870
1. Assert: Type(_done_) is Boolean.
@@ -884,7 +884,7 @@ for="ReadableStreamAsyncIteratorPrototype">return( <var>value</var> )</h4>
884
884
1. If *this*.[[preventCancel]] is *false*, then:
885
885
1. Let _result_ be ! ReadableStreamReaderGenericCancel(_reader_, _value_).
886
886
1. Perform ! ReadableStreamReaderGenericRelease(_reader_).
887
- 1. Return the result of <a>transforming </a> _result_ by a fulfillment handler that returns !
887
+ 1. Return the result of <a>reacting </a> to _result_ with a fulfillment step that returns !
888
888
ReadableStreamCreateReadResult(_value_, *true*, *true*).
889
889
1. Perform ! ReadableStreamReaderGenericRelease(_reader_).
890
890
1. Return <a>a promise resolved with</a> ! ReadableStreamCreateReadResult(_value_, *true*, *true*).
@@ -1058,8 +1058,8 @@ noticeable asymmetry between the two branches, and limits the possible <a>chunks
1058
1058
1. Let _pullAlgorithm_ be the following steps:
1059
1059
1. If _reading_ is *true*, return <a>a promise resolved with</a> *undefined*.
1060
1060
1. Set _reading_ to *true*.
1061
- 1. Let _readPromise_ be the result of <a>transforming </a> ! ReadableStreamDefaultReaderRead(_reader_) with a
1062
- fulfillment handler which takes the argument _result_ and performs the following steps :
1061
+ 1. Let _readPromise_ be the result of <a>reacting </a> to ! ReadableStreamDefaultReaderRead(_reader_) with the
1062
+ following fulfillment steps given the argument _result_:
1063
1063
1. Set _reading_ to *false*.
1064
1064
1. Assert: Type(_result_) is Object.
1065
1065
1. Let _done_ be ! Get(_result_, `"done"`).
@@ -1134,8 +1134,8 @@ noticeable asymmetry between the two branches, and limits the possible <a>chunks
1134
1134
1. If _preventCancel_ is *false*, <a for="set">append</a> the following action action to _actions_:
1135
1135
1. If _source_.[[_state_]] is `"readable"`, return ! ReadableStreamCancel(_source_, _error_).
1136
1136
1. Otherwise, return <a>a promise resolved with</a> *undefined*.
1137
- 1. <a href="#rs-pipeTo-shutdown-with-action">Shutdown with an action</a> consisting of <a>waiting for all</a>
1138
- of the actions in _actions_, and with _error_.
1137
+ 1. <a href="#rs-pipeTo-shutdown-with-action">Shutdown with an action</a> consisting of
1138
+ <a>getting a promise to wait for all</a> of the actions in _actions_, and with _error_.
1139
1139
1. If _signal_'s <a for=AbortSignal>aborted flag</a> is set, perform _abortAlgorithm_ and return _promise_.
1140
1140
1. <a for="AbortSignal">Add</a> _abortAlgorithm_ to _signal_.
1141
1141
1. <a>In parallel</a> <span class="XXX"> but not really; see <a
@@ -1281,7 +1281,7 @@ nothrow>ReadableStreamAddReadIntoRequest ( <var>stream</var> )</h4>
1281
1281
1. If _stream_.[[state]] is `"errored"`, return <a>a promise rejected with</a> _stream_.[[storedError]] .
1282
1282
1. Perform ! ReadableStreamClose(_stream_).
1283
1283
1. Let _sourceCancelPromise_ be ! _stream_.[[readableStreamController]] .<a abstract-op>[[CancelSteps]]</a> (_reason_).
1284
- 1. Return the result of <a>transforming </a> _sourceCancelPromise_ with a fulfillment handler that returns *undefined*.
1284
+ 1. Return the result of <a>reacting </a> to _sourceCancelPromise_ with a fulfillment step that returns *undefined*.
1285
1285
</emu-alg>
1286
1286
1287
1287
<h4 id="readable-stream-close" aoid="ReadableStreamClose" nothrow>ReadableStreamClose ( <var>stream</var> )</h4>
@@ -4954,8 +4954,8 @@ nothrow>TransformStreamDefaultControllerPerformTransform ( <var>controller</var>
4954
4954
4955
4955
<emu-alg>
4956
4956
1. Let _transformPromise_ be the result of performing _controller_.[[transformAlgorithm]] , passing _chunk_.
4957
- 1. Return the result of <a>transforming </a> _transformPromise_ with a rejection handler that, when called with
4958
- argument _r_, performs the following steps :
4957
+ 1. Return the result of <a>reacting </a> to _transformPromise_ with the following rejection steps given the
4958
+ argument _r_:
4959
4959
1. Perform ! TransformStreamError(_controller_.[[controlledTransformStream]] , _r_).
4960
4960
1. Throw _r_.
4961
4961
</emu-alg>
@@ -4987,8 +4987,7 @@ nothrow>TransformStreamDefaultSinkWriteAlgorithm ( <var>stream</var>, <var>chunk
4987
4987
1. If _stream_.[[backpressure]] is *true*,
4988
4988
1. Let _backpressureChangePromise_ be _stream_.[[backpressureChangePromise]] .
4989
4989
1. Assert: _backpressureChangePromise_ is not *undefined*.
4990
- 1. Return the result of <a>transforming</a> _backpressureChangePromise_ with a fulfillment handler which performs
4991
- the following steps:
4990
+ 1. Return the result of <a>reacting</a> to _backpressureChangePromise_ with the following fulfillment steps:
4992
4991
1. Let _writable_ be _stream_.[[writable]] .
4993
4992
1. Let _state_ be _writable_.[[state]] .
4994
4993
1. If _state_ is `"erroring"`, throw _writable_.[[storedError]] .
@@ -5013,13 +5012,13 @@ nothrow>TransformStreamDefaultSinkCloseAlgorithm( <var>stream</var> )</h4>
5013
5012
1. Let _controller_ be _stream_.[[transformStreamController]] .
5014
5013
1. Let _flushPromise_ be the result of performing _controller_.[[flushAlgorithm]] .
5015
5014
1. Perform ! TransformStreamDefaultControllerClearAlgorithms(_controller_).
5016
- 1. Return the result of <a>transforming </a> _flushPromise_ with :
5017
- 1. A fulfillment handler that performs the following steps :
5015
+ 1. Return the result of <a>reacting </a> to _flushPromise_ :
5016
+ 1. If _flushPromise_ was fulfilled, then :
5018
5017
1. If _readable_.[[state]] is `"errored"`, throw _readable_.[[storedError]] .
5019
5018
1. Let _readableController_ be _readable_.[[readableStreamController]] .
5020
5019
1. If ! ReadableStreamDefaultControllerCanCloseOrEnqueue(_readableController_) is *true*, perform !
5021
5020
ReadableStreamDefaultControllerClose(_readableController_).
5022
- 1. A rejection handler that, when called with argument _r_, performs the following steps :
5021
+ 1. If _flushPromise_ was rejected with reason _r_, then :
5023
5022
1. Perform ! TransformStreamError(_stream_, _r_).
5024
5023
1. Throw _readable_.[[storedError]] .
5025
5024
</emu-alg>
@@ -5365,7 +5364,8 @@ throws>CreateAlgorithmFromUnderlyingMethod ( <var ignore>underlyingObject</var>,
5365
5364
<var>args</var> )</h4>
5366
5365
5367
5366
<div class="note">
5368
- PromiseCall is a variant of <a>promise-calling</a> that works on methods.
5367
+ This encapsulates the relevant promise-related parts of the Web IDL <a>call a user object's operation</a> algorithm
5368
+ for use while we work on <a href="https://github.com/whatwg/streams/issues/963">moving to Web IDL</a> .
5369
5369
</div>
5370
5370
5371
5371
<emu-alg>
@@ -6091,8 +6091,6 @@ planned) that the conventions of ECMAScript itself will evolve in these ways.
6091
6091
<li> We use destructuring notation in function and method declarations, and assume that <a
6092
6092
abstract-op> DestructuringAssignmentEvaluation</a> was performed appropriately before the algorithm starts.
6093
6093
<li> We use "<emu-val> this</emu-val> " instead of "<emu-val> this</emu-val> value".
6094
- <li> We use the shorthand phrases from the [[!PROMISES-GUIDE]] to operate on promises at a higher level than the
6095
- ECMAScript spec does.
6096
6094
</ul>
6097
6095
6098
6096
It's also worth noting that, as in [[!ECMASCRIPT]] , all numbers are represented as double-precision floating point
0 commit comments