script: Ensure scheduled timers account for suspension offset.#39880
Merged
jdm merged 1 commit intoservo:mainfrom Oct 15, 2025
Merged
script: Ensure scheduled timers account for suspension offset.#39880jdm merged 1 commit intoservo:mainfrom
jdm merged 1 commit intoservo:mainfrom
Conversation
yezhizhen
approved these changes
Oct 15, 2025
Member
|
The unexpected result is also timer. Is it related to this PR? |
Member
Author
|
Yeah, definitely. I.missed that one in the try results. |
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When pages go into the bfcache, rendering engines record when the page is suspended. As part of https://html.spec.whatwg.org/multipage/browsing-the-web.html#reactivate-a-document, any outstanding timers need to have their duration offset by the time since the page was suspended. We used the correct offset when scheduling new timers in a page that has been reactivated, but the wrong offset when dealing with outstanding timers.
Testing: Lots of WPT tests that either pass or no longer timeout.
Fixes: #39545