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..45f0d885a308f10c3a3c62e13f080a7070e42385 100644 |
--- a/content/browser/frame_host/navigation_controller_impl.cc |
+++ b/content/browser/frame_host/navigation_controller_impl.cc |
@@ -910,8 +910,10 @@ bool NavigationControllerImpl::RendererDidNavigate( |
active_entry->GetFrameEntry(rfh->frame_tree_node()); |
// We may not find a frame_entry in some cases; ignore the PageState if so. |
// TODO(creis): Remove the "if" once https://crbug.com/522193 is fixed. |
- if (frame_entry) |
+ if (frame_entry) { |
frame_entry->set_page_state(params.page_state); |
+ active_entry->UpdatePageState(); |
+ } |
} else { |
active_entry->SetPageState(params.page_state); |
} |
@@ -1847,11 +1849,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()) { |