diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 0b437ab115b0..881c6b3d282a 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -8997,6 +8997,10 @@ nsDocShell::OnNewURI(nsIURI * aURI, nsIChannel * aChannel, nsISupports* aOwner, PR_LOG(gDocShellLog, PR_LOG_DEBUG, (" shAvailable=%i updateHistory=%i equalURI=%i\n", shAvailable, updateHistory, equalUri)); + + if (mCurrentURI && !mOSHE) { + 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, @@ -9006,12 +9010,18 @@ nsDocShell::OnNewURI(nsIURI * aURI, nsIChannel * aChannel, nsISupports* aOwner, * if this page has any frame children, it also will be handled * properly. see bug 83684 * + * NB: If mOSHE is null but we have a current URI, then it means + * that we must be at the transient about:blank content viewer + * (asserted above) and we should let the normal load continue, + * since there's nothing to replace. + * * XXX Hopefully changing the loadType at this time will not hurt * anywhere. The other way to take care of sequentially repeating * frameset pages is to add new methods to nsIDocShellTreeItem. * Hopefully I don't have to do that. */ if (equalUri && + mOSHE && (mLoadType == LOAD_NORMAL || mLoadType == LOAD_LINK || mLoadType == LOAD_STOP_CONTENT) &&