Closed Bug 2089368 Opened 20 days ago Closed 11 days ago

[wpt-sync] Sync PR 64345 - script: Cancel and do not run tasks for replaced documents

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64345 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64345
Details from upstream follow.

Martin Robinson <mrobinson@igalia.com> wrote:

script: Cancel and do not run tasks for replaced documents

This change does three things:

  1. Reworks the ScriptThread message handling logic to be more
    readable.
  2. Ensures that tasks for closed pipelines are never run.
  3. Cancels tasks when a Document is being replaced in a Window.
    This is supposed to happen via "unload," but that does not yet
    call "destroy" on the Document.

This fixes a crash where a promise rejection handler was queued for a
replaced Document and it was run without a global.

Testing: This change adds a WPT crash test.
Fixes: #<!-- nolink -->49305.

Reviewed in servo/servo#49399

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 17 tests

Status Summary

Firefox

OK : 16
PASS: 1[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, GitHub] 61[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 11

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/412404ba57c2 https://hg.mozilla.org/integration/autoland/rev/f0e8636883bb [wpt PR 64345] - script: Cancel and do not run tasks for replaced documents, a=testonly
Status: NEW → RESOLVED
Closed: 11 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.