Bug 633413, don't bfcache so often, part 2, r=bz, a=blocker
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Tue, 15 Feb 2011 13:41:38 +0200
changeset 62557 c9f50a19849e2b83543f4dcf1c586040d039c545
parent 62556 ebb58e2a3b29b1c1171db9b1d621e4025eb870dc
child 62558 2e288f06c6482a49933d6c33ad200d60407d93b8
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersbz, blocker
bugs633413
milestone2.0b12pre
Bug 633413, don't bfcache so often, part 2, r=bz, a=blocker
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -6560,16 +6560,23 @@ nsDocShell::CreateAboutBlankContentViewe
 PRBool
 nsDocShell::CanSavePresentation(PRUint32 aLoadType,
                                 nsIRequest *aNewRequest,
                                 nsIDocument *aNewDocument)
 {
     if (!mOSHE)
         return PR_FALSE; // no entry to save into
 
+    nsCOMPtr<nsIContentViewer> viewer;
+    mOSHE->GetContentViewer(getter_AddRefs(viewer));
+    if (viewer) {
+        NS_WARNING("mOSHE already has a content viewer!");
+        return PR_FALSE;
+    }
+
     // Only save presentation for "normal" loads and link loads.  Anything else
     // probably wants to refetch the page, so caching the old presentation
     // would be incorrect.
     if (aLoadType != LOAD_NORMAL &&
         aLoadType != LOAD_HISTORY &&
         aLoadType != LOAD_LINK &&
         aLoadType != LOAD_STOP_CONTENT &&
         aLoadType != LOAD_STOP_CONTENT_AND_REPLACE &&