Skip to content
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

yield: Add null check for inherited state in spec #107

Merged
merged 1 commit into from
Sep 16, 2024
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 spec/scheduling-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,12 @@ Issue: [=Run steps after a timeout=] doesn't necessarily account for suspension;
1. Let |result| be [=a new promise=].
1. Let |inheritedState| be the |scheduler|'s [=relevant agent=]'s [=agent/event loop=]'s
[=event loop/current scheduling state=].
1. Let |abortSource| be |inheritedState|'s [=scheduling state/abort source=].
1. Let |abortSource| be |inheritedState|'s [=scheduling state/abort source=] if |inheritedState|
is not null, or otherwise null.
1. If |abortSource| is not null and |abortSource| is [=AbortSignal/aborted=], then [=reject=]
|result| with |abortSource|'s [=AbortSignal/abort reason=] and return |result|.
1. Let |prioritySource| be |inheritedState|'s [=scheduling state/priority source=].
1. Let |prioritySource| be |inheritedState|'s [=scheduling state/priority source=] if
|inheritedState| is not null, or otherwise null.
1. If |prioritySource| is null, then set |prioritySource| to the result of [=creating a fixed
priority unabortable task signal=] given "{{TaskPriority/user-visible}}".
1. Let |handle| be the result of [=creating a task handle=] given |result| and |abortSource|.
Expand Down