Repository navigation
fix(browser): a same-document back/forward returns at its own commit, not the 1.2 s grace - #742
Merged
Merged
Conversation
… not the 1.2 s grace A back or forward over a pushState or anchor entry sends no new document, so it waited the full 1.2 s grace. The main frame's Page.navigatedWithinDocument is that entry's commit, and only its address bumps the tab's generation: the wait now ends once the address moved and that event arrived, with no new document begun and the tab not loading. Official returns these as soon as the tab stops loading. With extensions (which keep Page.* to themselves) and with no entry, it still ends at the grace.
|
PR test build retired — merged into |
Hona
added a commit
that referenced
this pull request
Nov 22, 2026
…e extensions run, too (#762) With extensions active the engine keeps Page.* to itself, so #742's Page.navigatedWithinDocument never reaches the app and the wait ran to the 1.2 s grace. The page's main execution context answers instead: a same-document entry keeps it, a new document destroys it. Once the address moved, that context is asked for location.href; the new address from it is the commit. At most 6 asks; anything else ends at the grace as before.
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.
What
An agent's
browser.back/browser.forwardover a same-document entry (apushStateentry or an anchor) returned only at the 1.2 s grace: such an entry sends no new document, so none of #696's commit signals arrive. Official returns it as soon as the tab stops loading.The main frame's
Page.navigatedWithinDocumentis that entry's commit, and only its address bumps the tab's generation. The wait now ends once:Page.navigatedWithinDocumentcount rose,Unchanged: cross-document entries (#696), a back with no entry, and same-document entries while extensions keep
Page.*to themselves still end at the grace.Files:
rpc/frames.rs(count main-framenavigatedWithinDocument),rpc/exec/settle.rs(the rule),rpc/exec/nav.rs(pass the count). No engine input.Checked
settle's table program (outside the repo, includessettle.rsby path): 20 rows ok, including 6 new same-document rows (event before address, address before event, a new document begun, still loading, extensions with no event).Not proved in this PR
devand post them here.