Repository navigation
Conversation
…grace A history entry restored from the back/forward cache commits without ever reporting loading, so back and forward waited out LOAD_SETTLE_GRACE (1,231 ms against official's 72 ms in the timing table). They now settle once the tab's URL, document or history ends change and it is not loading, as official waits for the navigation and then !isLoading (chromium.ts:1724-1746 at ba5bbef8); the grace stays as the fallback.
|
PR test build retired — this pull request is closed. |
…d title; no-op history ends return at once READER-12 on #635: the address change of a page restored from the back/forward cache came before its loading-state update, so the history wait could settle with the old canGoBack/canGoForward and title. The engine now reads them from the browser and its visible navigation entry with the address (ENGINE_REVISION 8, unpublished). back/forward with no entry that way return the tab at once, as official does (chromium.ts:1728-1733), instead of waiting out the grace.
…document Windowed runs showed forward failing as browser.document_changed: back settled on the address before its DevTools navigation events landed, and when they did the tab's generation moved under the next, already authorized, call. A history wait now also waits until the frame tracker no longer holds the old address for the main frame.
…grace, and skips it with extensions READER-12 #635-B1: an engine running extensions keeps Page.* events to itself, so the frame tracker never saw the new address and back/forward ran to the 15 s deadline. The tracker is now waited on only inside the fast settle (the 1.2 s grace still ends it), not at all when the engine runs extensions (BrowserHost::extensions_active), and the wait wakes at the grace while it holds.
…with extensions too READER-12 #635-B2: an engine running extensions drops Page.* events but not Runtime.executionContextsCleared, which bumps the tab's generation when it lands; skipping the frame-tracker wait with extensions let back return before it, so the next command failed document_changed (seen on dev's #640 build with uBlock Origin Lite). back/forward now wait until the tab's generation moves past the one they started at, with or without extensions; without extensions the main frame's tracked URL moving on settles it too (a same-document entry clears no contexts). LOAD_SETTLE_GRACE still ends any wait.
…ount, not the tab generation READER-12 #635-B3: the tab's generation also moves when sync_tabs sees the new address, before any DevTools event, and both the contexts clearing and the main frame navigating bump it. The frame tracker now counts the main frame's Runtime.executionContextsCleared and Page.frameNavigated; back/forward snapshot both and wait for the contexts to clear (with extensions, which drop Page.*), or for both (without), or, for a same-document entry, which sends neither, for the tracked address to move to the new one. LOAD_SETTLE_GRACE still ends any wait.
Hona
marked this pull request as draft
November 22, 2026 01:18
Member
Author
|
Parked as draft (ORCHESTRATOR, 22 Nov): #675 reverts #640's engine-message wake for the next release. This PR's settle logic will be rebuilt from a measured event order (a trace build: tab update, main Runtime.executionContextsCleared, Page.frameNavigated, Page.navigatedWithinDocument, frame-tree reply and first successful evaluate in the new document; back/forward/reload/same-document; four configurations; 20 runs each), not from reasoning. a9356bd (READER-12's counter design) is not for merge until then. |
Member
Author
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.
backandforwardtook 1,231,000 and 1,233,000 µs with almost no spread, against official's 72,000 and 77,000 (timing table, 22 Nov,notes\for-owner-engine.mdsection (j)). That isLOAD_SETTLE_GRACE(1.2 s) inexec/nav.rs.loading. Sosaw_loadingstayed false and the wait ran out the grace, which exists for a navigation that never starts.back/forwardremember the tab as it was: URL, document counter, andcanGoBack/canGoForward. When any of them changes, the history navigation has committed. The wait then settles as soon as the tab is not loading, as it does after a load it saw.!contents.isLoading()(packages/gui-plugins/src/browser/chromium.ts:1724-1746atba5bbef8).navigate,reloadandtabs.open(their waits already settle on the load they see).Re-measured
back/forwardon this PR's CI build in a timing ticket: in the PR comments.Also fixes a regression from #640 (in
dev-464)backreturned in about 30 ms with the right address, before the page's DevTools history commit reached the app's frame tracker. The agent's next command was authorized against the old document and failed[browser.document_changed](backthenforwardfailed in 3 of 4 configurations on dev's fix(browser): read the engine's messages in the turn they arrive, not the next frame #640 build and on dev + fix(browser): start an agent's browser command the turn the server announces it #657). The table of which sequences fail is in the comments.back/forwardon the history commit, and waits for the frame tracker to have the new document (frames_caught_up) before it returns. An engine running extensions sends noPage.*events, so with an extension it does not wait for them; the grace still ends any wait.origin/devin (no rebase) at21eeb6940e, so its proof runs with fix(browser): read the engine's messages in the turn they arrive, not the next frame #640.back. The proof suite now asserts sequences first time (back→forward,back→snapshot,navigate→click,reload→evaluate,tabs.open→snapshot) in all four configurations.