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

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

Issue 1496483002: OOPIF: Support session restore by combining/splitting frame PageStates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix remaining tests Created 5 years 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_browsertest.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 194a0e87499083a111e4e0f7db41cbe078dba168..bf5dcff69d563d16586e4bf54f2f5434265ffdcd 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1847,11 +1847,12 @@ void NavigationControllerImpl::FindFramesToNavigate(
return;
// Schedule a load in this frame if the new item isn't for the same item
- // sequence number in the same SiteInstance.
- // TODO(creis): Handle null SiteInstances during session restore.
+ // sequence number in the same SiteInstance. Newly restored items may not have
+ // a SiteInstance yet, in which case it will be assigned on first commit.
if (!old_item ||
new_item->item_sequence_number() != old_item->item_sequence_number() ||
- new_item->site_instance() != old_item->site_instance()) {
+ (new_item->site_instance() != nullptr &&
+ new_item->site_instance() != old_item->site_instance())) {
if (old_item &&
new_item->document_sequence_number() ==
old_item->document_sequence_number()) {
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698