Closed Bug 2072903 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62752 - Fix stylesheet and helper loading races

Categories

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

task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Domenic Denicola <d@domenic.me> wrote:

Fix stylesheet and helper loading races

Load the DOMParser URL tests' helper before creating the iframe whose load handler calls it. A fast iframe must not depend on the following external helper having finished loading.

Hold the script-text tests' stylesheet responses until the mutation callback releases them. A fixed network delay can expire during speculative loading, before the mutation timer is even scheduled, causing the target script to execute too soon.

Establish a WebSocket before navigating to each test document, then release its stylesheet through WPT's stash responder. This avoids relying on HTTP request prioritization while a parser-blocking stylesheet is pending. Release the stylesheet even after an earlier test failure so document loading can finish.

The existing 500 ms mutation delay still assumes the parser has prepared the target script by then; stylesheet completion is explicitly controlled.

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

CI Results

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

Total 4 tests and 45 subtests

Status Summary

Firefox

OK : 4
PASS: 180

Chrome

OK : 4
PASS: 180

Links

GitHub PR Head
GitHub PR Base

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