Repository navigation
fix(browser): keep asking Linux for the page until WebKit begins the load - #185
Merged
Merged
Conversation
…load A Linux page was built at 0×0 and asked for its address again once, after a fixed 80 ms wait. On a slow start that wait lands before the frame that sizes the view, WebKitGTK drops both navigations, and nothing asks again: the tab stays up and the page's server never sees a request. The page now reports whether WebKit began the latest address it was given, and the Browser asks again every 100 ms for up to 10 s until it did. The page server in scripts/browser.sh is threaded: one idle connection can no longer hold back the request the run waits for, and a failure prints that server's log.
The retry compared the page's latest request with the load WebKit reported, so a person who navigated to another address in the first seconds made the retry ask for the first one again and cancel theirs. Any load that began is enough: the page is loading, so nothing asks again.
The retry asked for the first address every 100 ms until the page reported a load, which replaced a newer address that had not committed yet and restarted a slow real page up to 100 times. A tick now stops on a newer request or a committed load, waits while a navigation is in flight, and asks only when the view is idle and nothing arrived. wry reports WebKit's `Committed` event, not its start, so the words say committed. The retry is held in the Browser and dropped when the tab closes. The policy has a test that fails when its newer-address or in-flight arm is weakened, and the retry's removal leaves the test unresolved. Decision 164 carries the new wording and the cost line.
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
On Linux the Browser now keeps asking for a page's address until WebKit reports that the load began, for up to ten seconds, instead of asking once after 80 ms. CI's page server answers each connection on its own thread, so one idle connection cannot hold back the request the run waits for, and a failed Browser run prints that server's log.
Why
The Browser page step on main found the window and the tab up but the local page was never requested, and stayed that way for the whole 30 s wait. The single retry after 80 ms landed before the frame that sizes the view, so WebKitGTK dropped it too and nothing asked again.
How
Asking again is driven by the page's own report that WebKit began a load, not by a timer, and any load that began ends it, so a later address is never cancelled. A page that begins a load which then fails still fails the check.
Test plan
cargo t --workspace --locked: 2680 passed.sh scripts/smoke.sh --keep: ok.linux-tests→ Browser page, re-run three times, each green.GET /and the token POST, which it previously timed out on.