Skip to content

Commit 3242933

Browse files
nhirokibfgeek
authored andcommitted
[worklets] Reject with error to rethrow (#509) (#958)
1 parent 9bd73eb commit 3242933

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

worklets/Overview.bs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,18 @@ When the user agent is to <dfn>fetch and invoke a worklet script</dfn> given |wo
449449

450450
2. Reject |promise| with an "{{AbortError}}" {{DOMException}}.
451451

452-
4. <a>Run a module script</a> given |script|.
452+
4. If |script|'s <a>error to rethrow</a> is not null, then run these steps:
453453

454-
5. <a>Queue a task</a> on |outsideSettings|'s <a>responsible event loop</a> to run these steps:
454+
1. If |pendingTaskStruct|'s <a for="pending tasks struct">counter</a> is not <b>-1</b>, then
455+
run these steps:
456+
457+
1. Set |pendingTaskStruct|'s <a for="pending tasks struct">counter</a> to <b>-1</b>.
458+
459+
2. Reject |promise| with |script|'s <a>error to rethrow</a>.
460+
461+
5. <a>Run a module script</a> given |script|.
462+
463+
6. <a>Queue a task</a> on |outsideSettings|'s <a>responsible event loop</a> to run these steps:
455464

456465
1. If |pendingTaskStruct|'s <a for="pending tasks struct">counter</a> is not <b>-1</b>, then
457466
run these steps:

0 commit comments

Comments
 (0)