Bug 451898. When stopping an error page load, make sure to null out mLSHE. r=biesi
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 29 Jul 2009 13:39:28 -0400
changeset 30832 82f131218d0941ab055652f4fe0636326df47dbb
parent 30831 bf4d4c37361cea4308936e2659db86c9ba715b32
child 30833 44fab2f1ab6464c31f431e17e2b524d7767f2f72
push id8270
push userbzbarsky@mozilla.com
push dateWed, 29 Jul 2009 17:40:04 +0000
treeherdermozilla-central@82f131218d09 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbiesi
bugs451898
milestone1.9.2a1pre
Bug 451898. When stopping an error page load, make sure to null out mLSHE. r=biesi
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -3947,16 +3947,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