Bug 583200 - Don't assert things about SHEntries if session history is disabled.
authorBlake Kaplan <mrbkap@gmail.com>
Thu, 12 Aug 2010 21:05:05 -0700
changeset 50371 a98a5c0c777eea0539ba804e18f6044133a796a2
parent 50370 245b36903bfb795c46c36f65bc0b64d1b7a468e0
child 50372 11ca949a6affc516fffee5acb96e83f645b1a42a
push idunknown
push userunknown
push dateunknown
bugs583200
milestone2.0b4pre
Bug 583200 - Don't assert things about SHEntries if session history is disabled.
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -9040,17 +9040,17 @@ nsDocShell::OnNewURI(nsIURI * aURI, nsIC
     if (mCurrentURI)
         aURI->Equals(mCurrentURI, &equalUri);
 
 #ifdef DEBUG
     PR_LOG(gDocShellLog, PR_LOG_DEBUG,
            ("  shAvailable=%i updateHistory=%i equalURI=%i\n",
             shAvailable, updateHistory, equalUri));
 
-    if (mCurrentURI && !mOSHE && aLoadType != LOAD_ERROR_PAGE) {
+    if (shAvailable && mCurrentURI && !mOSHE && aLoadType != LOAD_ERROR_PAGE) {
         NS_ASSERTION(IsAboutBlank(mCurrentURI), "no SHEntry for a non-transient viewer?");
     }
 #endif
 
     /* If the url to be loaded is the same as the one already there,
      * and the original loadType is LOAD_NORMAL, LOAD_LINK, or
      * LOAD_STOP_CONTENT, set loadType to LOAD_NORMAL_REPLACE so that
      * AddToSessionHistory() won't mess with the current SHEntry and