Skip to content

[worklets] Queue a task to reject addModule() #967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions worklets/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,16 @@ When the user agent is to <dfn>fetch and invoke a worklet script</dfn> given |wo

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

4. If |script|'s <a>error to rethrow</a> is not null, then run these steps:
4. If |script|'s <a>error to rethrow</a> is not null, then <a>queue a task</a> on
|outsideSettings|'s <a>responsible event loop</a> given |script|'s <a>error to rethrow</a>
to run these steps:

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

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

2. Reject |promise| with |script|'s <a>error to rethrow</a>.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the intention of this change is to reference the local argument passed to the task (i.e. avoid dereferencing |script| here), but <a>error to rethrow</a> still references #concept-script's error to rethrow.

2. Reject |promise| with <a>error to rethrow</a>.

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

Expand Down