Skip to content

script: Do not track outdated oustanding loads for stylesheets.#42208

Merged
TimvdLippe merged 1 commit intoservo:mainfrom
jdm:link-element-load
Jan 28, 2026
Merged

script: Do not track outdated oustanding loads for stylesheets.#42208
TimvdLippe merged 1 commit intoservo:mainfrom
jdm:link-element-load

Conversation

@jdm
Copy link
Copy Markdown
Member

@jdm jdm commented Jan 28, 2026

The HTMLLinkElement::pending_loads field should only be used to track outstanding loads for the current generation; any loads from previous generations can be ignored. This avoids confusion about when to dispatch load/error events. See #42187 (comment) for more details about how the timing of multiple loads for the same <link> element resulted in intermittent timeouts in one WPT test.

Testing: Intermittent failure did not appear within 75 runs; previously reproduced within 15.
Fixes: #42187

@jdm jdm requested a review from gterzian as a code owner January 28, 2026 05:29
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jan 28, 2026
@jdm
Copy link
Copy Markdown
Member Author

jdm commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix and thanks for debugging!

@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Jan 28, 2026
@TimvdLippe TimvdLippe added this pull request to the merge queue Jan 28, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 28, 2026
github-merge-queue bot pushed a commit that referenced this pull request Jan 28, 2026
The `HTMLLinkElement::pending_loads` field should only be used to track
outstanding loads for the current generation; any loads from previous
generations can be ignored. This avoids confusion about when to dispatch
load/error events. See
#42187 (comment) for
more details about how the timing of multiple loads for the same
`<link>` element resulted in intermittent timeouts in one WPT test.

Testing: Intermittent failure did not appear within 75 runs; previously
reproduced within 15.
Fixes: #42187

Signed-off-by: Josh Matthews <[email protected]>
Merged via the queue into servo:main with commit 7358d73 Jan 28, 2026
32 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jan 28, 2026
TimvdLippe added a commit to TimvdLippe/servo that referenced this pull request Feb 9, 2026
Most likely a regression introduced in servo#42208 where the pending
loads counter has been reset. For successful request this wasn't
an issue, but for failed requests it was. Therefore, guard against
these generation request problems by bailing out as soon as we
post-process the request (which we do for all failed requests).

Fixes servo#42477

Signed-off-by: Tim van der Lippe <[email protected]>
TimvdLippe added a commit to TimvdLippe/servo that referenced this pull request Feb 9, 2026
Most likely a regression introduced in servo#42208 where the pending
loads counter has been reset. For successful request this wasn't
an issue, but for failed requests it was. Therefore, guard against
these generation request problems by bailing out as soon as we
post-process the request (which we do for all failed requests).

Fixes servo#42477

Signed-off-by: Tim van der Lippe <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Feb 10, 2026
…ion (#42481)

Most likely a regression introduced in #42208 where the pending loads
counter has been reset. For successful request this wasn't an issue, but
for failed requests it was. Therefore, guard against these generation
request problems by bailing out as soon as we post-process the request
(which we do for all failed requests).

Fixes #42477

Signed-off-by: Tim van der Lippe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intermittent TIMEOUT in /css/cssom/HTMLLinkElement-load-event-002.html

3 participants