Skip to content

Commit d26db0e

Browse files
MattiasBuelensdomenic
authored andcommitted
Meta: change promises-guide references to Web IDL
Fixes #1020.
1 parent ae5e0cb commit d26db0e

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

index.bs

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Opaque Elements: emu-alg
1111
</pre>
1212

1313
<pre class=link-defaults>
14-
spec:promises-guide; type:dfn;
14+
spec:webidl; type:dfn;
1515
text:resolve
1616
</pre>
1717

@@ -863,8 +863,8 @@ prototype, are created with the internal slots described in the following table:
863863
1. If ! IsReadableStreamAsyncIterator(*this*) is *false*, return <a>a promise rejected with</a> a *TypeError* exception.
864864
1. Let _reader_ be *this*.[[asyncIteratorReader]].
865865
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_:
868868
1. Assert: Type(_result_) is Object.
869869
1. Let _done_ be ! Get(_result_, `"done"`).
870870
1. Assert: Type(_done_) is Boolean.
@@ -884,7 +884,7 @@ for="ReadableStreamAsyncIteratorPrototype">return( <var>value</var> )</h4>
884884
1. If *this*.[[preventCancel]] is *false*, then:
885885
1. Let _result_ be ! ReadableStreamReaderGenericCancel(_reader_, _value_).
886886
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 !
888888
ReadableStreamCreateReadResult(_value_, *true*, *true*).
889889
1. Perform ! ReadableStreamReaderGenericRelease(_reader_).
890890
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
10581058
1. Let _pullAlgorithm_ be the following steps:
10591059
1. If _reading_ is *true*, return <a>a promise resolved with</a> *undefined*.
10601060
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_:
10631063
1. Set _reading_ to *false*.
10641064
1. Assert: Type(_result_) is Object.
10651065
1. Let _done_ be ! Get(_result_, `"done"`).
@@ -1134,8 +1134,8 @@ noticeable asymmetry between the two branches, and limits the possible <a>chunks
11341134
1. If _preventCancel_ is *false*, <a for="set">append</a> the following action action to _actions_:
11351135
1. If _source_.[[_state_]] is `"readable"`, return ! ReadableStreamCancel(_source_, _error_).
11361136
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_.
11391139
1. If _signal_'s <a for=AbortSignal>aborted flag</a> is set, perform _abortAlgorithm_ and return _promise_.
11401140
1. <a for="AbortSignal">Add</a> _abortAlgorithm_ to _signal_.
11411141
1. <a>In parallel</a> <span class="XXX">but not really; see <a
@@ -1281,7 +1281,7 @@ nothrow>ReadableStreamAddReadIntoRequest ( <var>stream</var> )</h4>
12811281
1. If _stream_.[[state]] is `"errored"`, return <a>a promise rejected with</a> _stream_.[[storedError]].
12821282
1. Perform ! ReadableStreamClose(_stream_).
12831283
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*.
12851285
</emu-alg>
12861286

12871287
<h4 id="readable-stream-close" aoid="ReadableStreamClose" nothrow>ReadableStreamClose ( <var>stream</var> )</h4>
@@ -4954,8 +4954,8 @@ nothrow>TransformStreamDefaultControllerPerformTransform ( <var>controller</var>
49544954

49554955
<emu-alg>
49564956
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_:
49594959
1. Perform ! TransformStreamError(_controller_.[[controlledTransformStream]], _r_).
49604960
1. Throw _r_.
49614961
</emu-alg>
@@ -4987,8 +4987,7 @@ nothrow>TransformStreamDefaultSinkWriteAlgorithm ( <var>stream</var>, <var>chunk
49874987
1. If _stream_.[[backpressure]] is *true*,
49884988
1. Let _backpressureChangePromise_ be _stream_.[[backpressureChangePromise]].
49894989
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:
49924991
1. Let _writable_ be _stream_.[[writable]].
49934992
1. Let _state_ be _writable_.[[state]].
49944993
1. If _state_ is `"erroring"`, throw _writable_.[[storedError]].
@@ -5013,13 +5012,13 @@ nothrow>TransformStreamDefaultSinkCloseAlgorithm( <var>stream</var> )</h4>
50135012
1. Let _controller_ be _stream_.[[transformStreamController]].
50145013
1. Let _flushPromise_ be the result of performing _controller_.[[flushAlgorithm]].
50155014
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:
50185017
1. If _readable_.[[state]] is `"errored"`, throw _readable_.[[storedError]].
50195018
1. Let _readableController_ be _readable_.[[readableStreamController]].
50205019
1. If ! ReadableStreamDefaultControllerCanCloseOrEnqueue(_readableController_) is *true*, perform !
50215020
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:
50235022
1. Perform ! TransformStreamError(_stream_, _r_).
50245023
1. Throw _readable_.[[storedError]].
50255024
</emu-alg>
@@ -5365,7 +5364,8 @@ throws>CreateAlgorithmFromUnderlyingMethod ( <var ignore>underlyingObject</var>,
53655364
<var>args</var> )</h4>
53665365

53675366
<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>.
53695369
</div>
53705370

53715371
<emu-alg>
@@ -6091,8 +6091,6 @@ planned) that the conventions of ECMAScript itself will evolve in these ways.
60916091
<li> We use destructuring notation in function and method declarations, and assume that <a
60926092
abstract-op>DestructuringAssignmentEvaluation</a> was performed appropriately before the algorithm starts.
60936093
<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.
60966094
</ul>
60976095

60986096
It's also worth noting that, as in [[!ECMASCRIPT]], all numbers are represented as double-precision floating point

0 commit comments

Comments
 (0)