Closed Bug 2092343 Opened 17 days ago Closed 8 days ago

[wpt-sync] Sync PR 65125 - Block re-entrant navigations during CommitNavigation document abort

Categories

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

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Nate Chapin <japhet@chromium.org> wrote:

Block re-entrant navigations during CommitNavigation document abort

FrameLoader::CommitNavigation() calls
CancelProvisionalLoaderForNewNavigation(), which triggers
Document::Abort() and can synchronously dispatch a readystatechange
event. Previously, a listener (or nested run loop such as
window.print()) could start or commit another navigation
mid-CommitNavigation(), causing CommitNavigation() to later clone
ExtraData or overwrite state from an interleaved cross-origin
DocumentLoader.

Scope a FrameNavigationDisabler around
CancelProvisionalLoaderForNewNavigation() in CommitNavigation(),
matching DetachDocument(). Also guard
ScriptController::ExecuteJavaScriptURL() against running script or
overwriting the Document if a new Document is committed during the
Trusted Types pre-navigation check or script execution, even when the
initial empty LocalDOMWindow is reused.

Fixed: 580879655, 584307204
Change-Id: Ia47d16f95ff6876f6ba2c836de0deaebfffffa79
Reviewed-on: https://chromium-review.googlesource.com/8803658
WPT-Export-Revision: bc50774f54cdb30661385a9a6d3ca249172150e7

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 1 tests and 2 subtests

Status Summary

Firefox

OK : 1
PASS: 2

Chrome

OK : 1
FAIL: 2

Safari

OK : 1
PASS: 1
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/21636d1c743d https://hg.mozilla.org/integration/autoland/rev/d437992c4f16 [wpt PR 65125] - Block re-entrant navigations during CommitNavigation document abort, a=testonly
Whiteboard: [wptsync downstream error] → [wptsync downstream]

Test result changes from PR not available.

Status: NEW → RESOLVED
Closed: 8 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.