github web-platform-tests/wpt merge_pr_47653

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
12 months ago

AbortSignal: Propagate aborted state to dependent signals before firing events

The implementation and spec of dependent signals assumes and asserts that a dependent signal is aborted if any of its sources have been
aborted. But this property does not hold during the abort process, since
intermediate states of abort propagation can be observed. For example,
calling AbortSignal.any([signal]) in an "abort" event listener for one
of signal's sources is a way to observe intermediate state, since the
"abort" event fires before the source signal's dependents are updated.

To fix this, this CL decouples setting the abort state and reacting to
abort event:

  1. Mark the source signal as aborted
  2. Propagate the aborted state to any dependent signals
  3. Run abort steps (run algorithms, fire events) for the source signal
  4. Run abort steps for each of the dependent signals

PR: whatwg/dom#1295

Change-Id: I65a97eb46b01a0071d661e945f64c90e33954088
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5664649
Commit-Queue: Scott Haseley shaseley@chromium.org
Reviewed-by: Joey Arhar jarhar@chromium.org
Cr-Commit-Position: refs/heads/main@{#1344364}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.