Skip to content

Commit f76fbd3

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

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>
@@ -5475,7 +5475,7 @@
54755475
3. Otherwise:
54765476
1. Assign a copy of `init.data` to {{ImageDecoder/[[encoded data]]}}.
54775477
4. Assign `true` to {{ImageDecoder/[[complete]]}}.
5478-
5. Resolve {{ImageDecoder/[[completed promise]]}}.
5478+
5. [=Resolve=] {{ImageDecoder/[[completed promise]]}}.
54795479
6. Queue a control message to [=configure the image decoder=] with
54805480
|init|.
54815481
7. Queue a control message to [=decode track metadata=].
@@ -5591,7 +5591,7 @@
55915591
3. Run the following steps [=in parallel=]:
55925592
1. Let |isSupported| be the result of running the
55935593
[=Check Type Support=] algorithm with |type|.
5594-
2. [=Queue a task=] to resolve |p| with |isSupported|.
5594+
2. [=Queue a task=] to [=resolve=] |p| with |isSupported|.
55955595
4. Return |p|.
55965596

55975597
### Algorithms ### {#imagedecoder-algorithms}
@@ -5616,7 +5616,7 @@
56165616

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

56215621
: [=read request/error steps=]
56225622
:: 1. [=Queue a task=] to run the [=ImageDecoder/Close ImageDecoder=]
@@ -5678,7 +5678,7 @@
56785678
{{ImageTrackList/[[track list]]}} internal slot.
56795679
2. Assign |selectedTrackIndex| to {{ImageDecoder/tracks}}
56805680
{{ImageTrackList/[[selected index]]}}.
5681-
3. Resolve {{ImageTrackList/[[ready promise]]}}.
5681+
3. [=Resolve=] {{ImageTrackList/[[ready promise]]}}.
56825682

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

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

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

58795879
: <dfn for=ImageDecoder>Fatally Reject Bad Data</dfn>
58805880
:: 1. [=Queue a task=] to perform these steps:
@@ -5892,7 +5892,7 @@
58925892
decoding operation.
58935893
2. For each |decodePromise| in
58945894
{{ImageDecoder/[[pending decode promises]]}}:
5895-
1. Reject |decodePromise| with |exception|.
5895+
1. [=Reject=] |decodePromise| with |exception|.
58965896
2. Remove |decodePromise| from
58975897
{{ImageDecoder/[[pending decode promises]]}}.
58985898

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

59135913
ImageDecoderInit Interface {#imagedecoderinit-interface}

0 commit comments

Comments
 (0)