Skip to content

Commit 1046684

Browse files
committed
Use linked resolve/reject language everywhere
WebIDL now has special handling for resolve, reject, we should use it everywhere
1 parent 2f46fe3 commit 1046684

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

index.src.html

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@
485485
algorithm with |decoded outputs|.
486486
2. Remove |promise| from
487487
{{AudioDecoder/[[pending flush promises]]}}.
488-
3. Resolve |promise|.
488+
3. [=Resolve=] |promise|.
489489
2. Return `"processed"`.
490490
</dd>
491491

@@ -534,7 +534,7 @@
534534
1. Set {{AudioDecoderSupport/config}} to the result of running the
535535
<a>Clone Configuration</a> algorithm with |config|.
536536
2. Set {{AudioDecoderSupport/supported}} to |supported|.
537-
2. Resolve |p| with |decoderSupport|.
537+
2. [=Resolve=] |p| with |decoderSupport|.
538538
5. Return |p|.
539539
</dd>
540540
</dl>
@@ -584,7 +584,7 @@
584584
1. Set {{AudioDecoder/[[decodeQueueSize]]}} to zero.
585585
2. Run the [=AudioDecoder/Schedule Dequeue Event=] algorithm.
586586
6. For each |promise| in {{AudioDecoder/[[pending flush promises]]}}:
587-
1. Reject |promise| with |exception|.
587+
1. [=Reject=] |promise| with |exception|.
588588
2. Remove |promise| from {{AudioDecoder/[[pending flush promises]]}}.
589589
</dd>
590590
<dt><dfn>Close AudioDecoder</dfn> (with |exception|)</dt>
@@ -831,7 +831,7 @@
831831
algorithm with |decoded outputs|.
832832
2. Remove |promise| from
833833
{{VideoDecoder/[[pending flush promises]]}}.
834-
3. Resolve |promise|.
834+
3. [=Resolve=] |promise|.
835835
2. Return `"processed"`.
836836
</dd>
837837

@@ -880,7 +880,7 @@
880880
1. Set {{VideoDecoderSupport/config}} to the result of running the
881881
<a>Clone Configuration</a> algorithm with |config|.
882882
2. Set {{VideoDecoderSupport/supported}} to |supported|.
883-
2. Resolve |p| with |decoderSupport|.
883+
2. [=Resolve=] |p| with |decoderSupport|.
884884
5. Return |p|.
885885
</dd>
886886
</dl>
@@ -943,7 +943,7 @@
943943
1. Set {{VideoDecoder/[[decodeQueueSize]]}} to zero.
944944
2. Run the [=VideoDecoder/Schedule Dequeue Event=] algorithm.
945945
6. For each |promise| in {{VideoDecoder/[[pending flush promises]]}}:
946-
1. Reject |promise| with |exception|.
946+
1. [=Reject=] |promise| with |exception|.
947947
2. Remove |promise| from {{VideoDecoder/[[pending flush promises]]}}.
948948
</dd>
949949
<dt><dfn>Close VideoDecoder</dfn> (with |exception|)</dt>
@@ -1173,7 +1173,7 @@
11731173
[=Output EncodedAudioChunks=] algorithm with |encoded outputs|.
11741174
2. Remove |promise| from
11751175
{{AudioEncoder/[[pending flush promises]]}}.
1176-
3. Resolve |promise|.
1176+
3. [=Resolve=] |promise|.
11771177
2. Return `"processed"`.
11781178
</dd>
11791179

@@ -1222,7 +1222,7 @@
12221222
1. Set {{AudioEncoderSupport/config}} to the result of running the
12231223
<a>Clone Configuration</a> algorithm with |config|.
12241224
2. Set {{AudioEncoderSupport/supported}} to |supported|.
1225-
2. Resolve |p| with |encoderSupport|.
1225+
2. [=Resolve=] |p| with |encoderSupport|.
12261226
5. Return |p|.
12271227
</dd>
12281228
</dl>
@@ -1302,7 +1302,7 @@
13021302
1. Set {{AudioEncoder/[[encodeQueueSize]]}} to zero.
13031303
2. Run the [=AudioEncoder/Schedule Dequeue Event=] algorithm.
13041304
8. For each |promise| in {{AudioEncoder/[[pending flush promises]]}}:
1305-
1. Reject |promise| with |exception|.
1305+
1. [=Reject=] |promise| with |exception|.
13061306
2. Remove |promise| from {{AudioEncoder/[[pending flush promises]]}}.
13071307
</dd>
13081308
<dt><dfn>Close AudioEncoder</dfn> (with |exception|)</dt>
@@ -1559,7 +1559,7 @@
15591559
[=Output EncodedVideoChunks=] algorithm with |encoded outputs|.
15601560
2. Remove |promise| from
15611561
{{VideoEncoder/[[pending flush promises]]}}.
1562-
3. Resolve |promise|.
1562+
3. [=Resolve=] |promise|.
15631563
2. Return `"processed"`.
15641564
</dd>
15651565

@@ -1608,7 +1608,7 @@
16081608
1. Set {{VideoEncoderSupport/config}} to the result of running the
16091609
<a>Clone Configuration</a> algorithm with |config|.
16101610
2. Set {{VideoEncoderSupport/supported}} to |supported|.
1611-
2. Resolve |p| with |encoderSupport|.
1611+
2. [=Resolve=] |p| with |encoderSupport|.
16121612
5. Return |p|.
16131613
</dd>
16141614
</dl>
@@ -1707,7 +1707,7 @@
17071707
1. Set {{VideoEncoder/[[encodeQueueSize]]}} to zero.
17081708
2. Run the [=VideoEncoder/Schedule Dequeue Event=] algorithm.
17091709
8. For each |promise| in {{VideoEncoder/[[pending flush promises]]}}:
1710-
1. Reject |promise| with |exception|.
1710+
1. [=Reject=] |promise| with |exception|.
17111711
2. Remove |promise| from {{VideoEncoder/[[pending flush promises]]}}.
17121712
</dd>
17131713
<dt><dfn>Close VideoEncoder</dfn> (with |exception|)</dt>
@@ -3907,7 +3907,7 @@
39073907
4. Increment |row| by `1`.
39083908
10. Increment |planeIndex| by `1`.
39093909
11. Append |layout| to |planeLayouts|.
3910-
5. [=Queue a task=] to resolve |p| with |planeLayouts|.
3910+
5. [=Queue a task=] to [=resolve=] |p| with |planeLayouts|.
39113911
11. Return |p|.
39123912

39133913
: <dfn method for=VideoFrame>clone()</dfn>
@@ -5473,7 +5473,7 @@
54735473
3. Otherwise:
54745474
1. Assign a copy of `init.data` to {{ImageDecoder/[[encoded data]]}}.
54755475
4. Assign `true` to {{ImageDecoder/[[complete]]}}.
5476-
5. Resolve {{ImageDecoder/[[completed promise]]}}.
5476+
5. [=Resolve=] {{ImageDecoder/[[completed promise]]}}.
54775477
6. Queue a control message to [=configure the image decoder=] with
54785478
|init|.
54795479
7. Queue a control message to [=decode track metadata=].
@@ -5589,7 +5589,7 @@
55895589
3. Run the following steps [=in parallel=]:
55905590
1. Let |isSupported| be the result of running the
55915591
[=Check Type Support=] algorithm with |type|.
5592-
2. [=Queue a task=] to resolve |p| with |isSupported|.
5592+
2. [=Queue a task=] to [=resolve=] |p| with |isSupported|.
55935593
4. Return |p|.
55945594

55955595
### Algorithms ### {#imagedecoder-algorithms}
@@ -5614,7 +5614,7 @@
56145614

56155615
: [=read request/close steps=]
56165616
:: 1. Assign `true` to {{ImageDecoder/[[complete]]}}
5617-
2. Resolve {{ImageDecoder/[[completed promise]]}}.
5617+
2. [=Resolve=] {{ImageDecoder/[[completed promise]]}}.
56185618

56195619
: [=read request/error steps=]
56205620
:: 1. [=Queue a task=] to run the [=ImageDecoder/Close ImageDecoder=]
@@ -5676,7 +5676,7 @@
56765676
{{ImageTrackList/[[track list]]}} internal slot.
56775677
2. Assign |selectedTrackIndex| to {{ImageDecoder/tracks}}
56785678
{{ImageTrackList/[[selected index]]}}.
5679-
3. Resolve {{ImageTrackList/[[ready promise]]}}.
5679+
3. [=Resolve=] {{ImageTrackList/[[ready promise]]}}.
56805680

56815681
: <dfn for=ImageDecoder>Get Default Selected Track Index</dfn> (with
56825682
|trackList|)
@@ -5851,15 +5851,15 @@
58515851
[=Create a VideoFrame=] algorithm with |output|, |timestamp|,
58525852
|duration|, |rotation|, and |flip|.
58535853
19. Remove |promise| from {{ImageDecoder/[[pending decode promises]]}}.
5854-
20. Resolve |promise| with |decodeResult|.
5854+
20. [=Resolve=] |promise| with |decodeResult|.
58555855

58565856
: <dfn for=ImageDecoder>Resolve Decode</dfn> (with |promise| and |result|)
58575857
:: 1. [=Queue a task=] to perform these steps:
58585858
1. If {{ImageDecoder/[[closed]]}}, abort these steps.
58595859
2. Assert that |promise| is an element of
58605860
{{ImageDecoder/[[pending decode promises]]}}.
58615861
3. Remove |promise| from {{ImageDecoder/[[pending decode promises]]}}.
5862-
4. Resolve |promise| with |result|.
5862+
4. [=Resolve=] |promise| with |result|.
58635863

58645864
: <dfn for=ImageDecoder>Reject Infeasible Decode</dfn> (with |promise|)
58655865
:: 1. Assert that {{ImageDecoder/complete}} is `true` or
@@ -5872,7 +5872,7 @@
58725872
2. Assert that |promise| is an element of
58735873
{{ImageDecoder/[[pending decode promises]]}}.
58745874
3. Remove |promise| from {{ImageDecoder/[[pending decode promises]]}}.
5875-
4. Reject |promise| with |exception|.
5875+
4. [=Reject=] |promise| with |exception|.
58765876

58775877
: <dfn for=ImageDecoder>Fatally Reject Bad Data</dfn>
58785878
:: 1. [=Queue a task=] to perform these steps:
@@ -5890,7 +5890,7 @@
58905890
decoding operation.
58915891
2. For each |decodePromise| in
58925892
{{ImageDecoder/[[pending decode promises]]}}:
5893-
1. Reject |decodePromise| with |exception|.
5893+
1. [=Reject=] |decodePromise| with |exception|.
58945894
2. Remove |decodePromise| from
58955895
{{ImageDecoder/[[pending decode promises]]}}.
58965896

@@ -5899,13 +5899,13 @@
58995899
1. Assign `true` to {{ImageDecoder/[[closed]]}}.
59005900
2. Clear {{ImageDecoder/[[codec implementation]]}} and release associated
59015901
[=system resources=].
5902-
3. If {{ImageDecoder/[[ImageTrackList]]}} is empty, reject
5902+
3. If {{ImageDecoder/[[ImageTrackList]]}} is empty, [=reject=]
59035903
{{ImageTrackList/[[ready promise]]}} with |exception|. Otherwise
59045904
perform these steps,
59055905
1. Remove all entries from {{ImageDecoder/[[ImageTrackList]]}}.
59065906
2. Assign `-1` to {{ImageDecoder/[[ImageTrackList]]}}'s
59075907
{{ImageTrackList/[[selected index]]}}.
5908-
4. If {{ImageDecoder/[[complete]]}} is false resolve
5908+
4. If {{ImageDecoder/[[complete]]}} is false, [=reject=]
59095909
{{ImageDecoder/[[completed promise]]}} with |exception|.
59105910

59115911
ImageDecoderInit Interface {#imagedecoderinit-interface}

0 commit comments

Comments
 (0)