Skip to content

Commit 36c2ea1

Browse files
nhirokibfgeek
authored andcommitted
[worklets] Queue a task to reject addModule() (w3c#967)
This is a follow-up patch for w3c#958. A task to reject addModule() should be queued with script's error to rethrow to run on the thread where addModule() is called.
1 parent 331989d commit 36c2ea1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

worklets/Overview.bs

+4-2
Original file line numberDiff line numberDiff line change
@@ -449,14 +449,16 @@ 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. If |script|'s <a>error to rethrow</a> is not null, then run these steps:
452+
4. If |script|'s <a>error to rethrow</a> is not null, then <a>queue a task</a> on
453+
|outsideSettings|'s <a>responsible event loop</a> given |script|'s <a>error to rethrow</a>
454+
to run these steps:
453455

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

457459
1. Set |pendingTaskStruct|'s <a for="pending tasks struct">counter</a> to <b>-1</b>.
458460

459-
2. Reject |promise| with |script|'s <a>error to rethrow</a>.
461+
2. Reject |promise| with <a>error to rethrow</a>.
460462

461463
5. <a>Run a module script</a> given |script|.
462464

0 commit comments

Comments
 (0)