Skip to content

Commit ec14f7d

Browse files
authored
yield: Add null check for inherited state in spec (WICG#107)
1 parent 00a8773 commit ec14f7d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/scheduling-tasks.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,12 @@ Issue: [=Run steps after a timeout=] doesn't necessarily account for suspension;
342342
1. Let |result| be [=a new promise=].
343343
1. Let |inheritedState| be the |scheduler|'s [=relevant agent=]'s [=agent/event loop=]'s
344344
[=event loop/current scheduling state=].
345-
1. Let |abortSource| be |inheritedState|'s [=scheduling state/abort source=].
345+
1. Let |abortSource| be |inheritedState|'s [=scheduling state/abort source=] if |inheritedState|
346+
is not null, or otherwise null.
346347
1. If |abortSource| is not null and |abortSource| is [=AbortSignal/aborted=], then [=reject=]
347348
|result| with |abortSource|'s [=AbortSignal/abort reason=] and return |result|.
348-
1. Let |prioritySource| be |inheritedState|'s [=scheduling state/priority source=].
349+
1. Let |prioritySource| be |inheritedState|'s [=scheduling state/priority source=] if
350+
|inheritedState| is not null, or otherwise null.
349351
1. If |prioritySource| is null, then set |prioritySource| to the result of [=creating a fixed
350352
priority unabortable task signal=] given "{{TaskPriority/user-visible}}".
351353
1. Let |handle| be the result of [=creating a task handle=] given |result| and |abortSource|.

0 commit comments

Comments
 (0)