Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1154)

Unified Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 2319843002: Fix null check to avoid RendererDidNavigateSamePage crash. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_controller_impl.cc
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index e49372f1eaa7a76db3cd551e03ea13a037c56f2c..ba6b142f6ea5ada6ac70a0bb602386c797155f2d 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1008,7 +1008,7 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
// make sure Blink didn't treat a new cross-process navigation as inert, and
// thus set params.did_create_new_entry to false. In that case, we must
// treat it as NEW since the SiteInstance doesn't match the entry.
- if (GetLastCommittedEntry() &&
+ if (!GetLastCommittedEntry() ||
GetLastCommittedEntry()->site_instance() != rfh->GetSiteInstance())
return NAVIGATION_TYPE_NEW_PAGE;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698