Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark dependent abort signals as aborted before firing events
The assert in 4.2.1 of "create a dependent abort signal" fails when creating a dependent signal while dispatching abort events or running abort algorithms if abort had not yet been propagated to one of the sources. This fix splits "signal abort" into two phases: first, set the abort reason on the signal being aborted and all of its unaborted dependents; next, run the abort algorithms and dispatch events for the signal and those same dependents. Note that: 1. Dependent signals do not themselves have dependent signals, which means it's unnecessary to recursively call "signal abort" 2. This approach retains the existing event dispatch order, while ensuring the abort state is synced before any JS runs This fixes #1293.
- Loading branch information