- From: Scott Haseley <notifications@github.com>
- Date: Mon, 15 Jul 2024 16:11:52 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/pull/1295@github.com>
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. --- <!-- Thank you for contributing to the DOM Standard! Please describe the change you are making and complete the checklist below if your change is not editorial. When editing this comment after the PR is created, check that PR-Preview doesn't overwrite your changes. If you think your PR is ready to land, please double-check that the build is passing and the checklist is complete before pinging. --> - [ ] At least two implementers are interested (and none opposed): * … * … - [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at: * … <!-- If these tests are tentative, link a PR to make them non-tentative. --> * Tests are [WIP](https://crrev.com/c/5664649), pending review of this approach. - [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed: * Chromium: … * Gecko: … * WebKit: … * Deno (only for aborting and events): … * Node.js (only for aborting and events): … - [ ] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: … - [ ] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use. <!-- If you created this PR from a single commit, Github copied its message. Otherwise, you need to add a commit message yourself. --> (See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.) You can view, comment on, or merge this pull request online at: https://github.com/whatwg/dom/pull/1295 -- Commit Summary -- * Mark dependent abort signals as aborted before firing events -- File Changes -- M dom.bs (34) -- Patch Links -- https://github.com/whatwg/dom/pull/1295.patch https://github.com/whatwg/dom/pull/1295.diff -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/1295 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/pull/1295@github.com>
Received on Monday, 15 July 2024 23:11:56 UTC