-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix RFHI::pending_navigate_ cleanup after crashes and early RFH swaps.
When resuming a navigation that had been saved into RenderFrameHostImpl::pending_navigate_, we need to account for the fact that OnBeginNavigation() calls GetFrameHostForNavigation() which may perform an early RenderFrameHost swap and synchronously destroy the old RFH. There's also no need to keep a pending_navigate_ around after the corresponding renderer process crashes, so this CL also adds logic to clear it. Resuming such a navigation would require additional work, since the NavigationClient stashed in pending_navigate_ is no longer usable and would just immediately call the disconnect handler and cancel the navigation. But there isn't really any benefit to adding that complexity, and we already cancel the RFH's other ongoing navigations when its renderer process dies. This CL also tweaks the logic in RenderWidgetHostImpl to allow the resuming logic (ResumeLoadingCreatedWebContents) to work without hitting DCHECKs, if it's called after a renderer process crash. This case never worked cleanly before, but is supported now (and allows the new test to work without crashing). Bug: 1487110 Change-Id: Icd6a55002e52729e6ee966210efba1a5ce23eb55 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4908270 Commit-Queue: Alex Moshchuk <alexmos@chromium.org> Reviewed-by: Rakina Zata Amni <rakina@chromium.org> Cr-Commit-Position: refs/heads/main@{#1205927}
- Loading branch information
Alex Moshchuk
authored and
Chromium LUCI CQ
committed
Oct 5, 2023
1 parent
1e0bfc6
commit 093daae
Showing
3 changed files
with
94 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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