diff --git a/worklets/Overview.bs b/worklets/Overview.bs index a919a0fa..af3967c6 100644 --- a/worklets/Overview.bs +++ b/worklets/Overview.bs @@ -449,9 +449,18 @@ When the user agent is to fetch and invoke a worklet script given |wo 2. Reject |promise| with an "{{AbortError}}" {{DOMException}}. - 4. Run a module script given |script|. + 4. If |script|'s error to rethrow is not null, then run these steps: - 5. Queue a task on |outsideSettings|'s responsible event loop to run these steps: + 1. If |pendingTaskStruct|'s counter is not -1, then + run these steps: + + 1. Set |pendingTaskStruct|'s counter to -1. + + 2. Reject |promise| with |script|'s error to rethrow. + + 5. Run a module script given |script|. + + 6. Queue a task on |outsideSettings|'s responsible event loop to run these steps: 1. If |pendingTaskStruct|'s counter is not -1, then run these steps: