Bug 451898. When stopping an error page load, make sure to null out mLSHE. r=biesi, a=samuelsidler
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 29 Jul 2009 13:39:28 -0400
changeset 26167 a62f306d8fa74fdb58f0e43c77ff7aeade7e0ebb
parent 26166 ab87d66c0521172e012dd54841b0b7cb7a89400f
child 26168 039f168da2c880fa3687743c535ca774ed1537c7
push id1837
push userbzbarsky@mozilla.com
push dateWed, 29 Jul 2009 21:25:09 +0000
reviewersbiesi, samuelsidler
bugs451898
milestone1.9.1.2pre
Bug 451898. When stopping an error page load, make sure to null out mLSHE. r=biesi, a=samuelsidler
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -3582,16 +3582,22 @@ nsDocShell::Reload(PRUint32 aReloadFlags
 }
 
 NS_IMETHODIMP
 nsDocShell::Stop(PRUint32 aStopFlags)
 {
     // Revoke any pending event related to content viewer restoration
     mRestorePresentationEvent.Revoke();
 
+    if (mLoadType == LOAD_ERROR_PAGE && mLSHE) {
+        // Since error page loads never unset mLSHE, do so now
+        SetHistoryEntry(&mOSHE, mLSHE);
+        SetHistoryEntry(&mLSHE, nsnull);
+    }
+
     if (nsIWebNavigation::STOP_CONTENT & aStopFlags) {
         // Stop the document loading
         if (mContentViewer)
             mContentViewer->Stop();
     }
 
     if (nsIWebNavigation::STOP_NETWORK & aStopFlags) {
         // Suspend any timers that were set for this loader.  We'll clear