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

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

Issue 311783005: Fix crash in NavigationControllerImpl::RendererDidNavigateToNewPage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | content/browser/frame_host/navigation_controller_impl_unittest.cc » ('j') | 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 bc83135fb80526cd793af60c9797a551487fb1f1..bcb370218277b8bcb1cad176a9a64d58450cb221 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1060,7 +1060,7 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
// history.pushState() is classified as a navigation to a new page, but
// sets was_within_same_page to true. In this case, we already have the
// title available, so set it immediately.
- if (params.was_within_same_page)
+ if (params.was_within_same_page && GetLastCommittedEntry())
new_entry->SetTitle(GetLastCommittedEntry()->GetTitle());
DCHECK(!params.history_list_was_cleared || !replace_entry);
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698