Bug 1312609. r=smaug a=abillings
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 29 Nov 2016 15:15:35 -0600
changeset 359008 146b0561cd2e1e0b73dff47098664471484d32e8
parent 359007 166d234f600f30dc861970844f7b4cd034599d97
child 359009 060ac6a3389241accff8ffaa377d2318df8508c6
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, abillings
bugs1312609
milestone51.0
Bug 1312609. r=smaug a=abillings
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -8921,16 +8921,18 @@ nsDocShell::RestoreFromHistory()
   nsViewManager* newVM = shell ? shell->GetViewManager() : nullptr;
   nsView* newRootView = newVM ? newVM->GetRootView() : nullptr;
 
   // Insert the new root view at the correct location in the view tree.
   if (container) {
     nsSubDocumentFrame* subDocFrame =
       do_QueryFrame(container->GetPrimaryFrame());
     rootViewParent = subDocFrame ? subDocFrame->EnsureInnerView() : nullptr;
+  } else {
+    rootViewParent = nullptr;
   }
   if (sibling &&
       sibling->GetShell() &&
       sibling->GetShell()->GetViewManager()) {
     rootViewSibling = sibling->GetShell()->GetViewManager()->GetRootView();
   } else {
     rootViewSibling = nullptr;
   }