alloy: Fix FrameHandlerTest failures with BackForwardCache enabled (see issue #2421)

To test:
Run `ceftests --gtest_filter=FrameHandlerTest.OrderSub*
              --enable-features=BackForwardCache`
This commit is contained in:
Marshall Greenblatt
2021-09-15 21:40:53 +03:00
parent 7a56371b84
commit db807e804a
4 changed files with 25 additions and 2 deletions

View File

@@ -365,6 +365,10 @@ void CefBrowserContentsDelegate::DidFinishNavigation(
(error_code == net::OK ? navigation_handle->GetURL() : GURL());
auto browser_info = browser_info_;
if (!browser_info->browser()) {
// Ignore notifications when the browser is closing.
return;
}
// May return NULL when starting a new navigation if the previous navigation
// caused the renderer process to crash during load.