Bug 580819 - Don't try to "replace" the transient about:blank content viewer when loading about:blank immediately after it. r=smaug

This commit is contained in:
Blake Kaplan 2010-07-21 16:26:27 -07:00
parent 83fd9cd6ac
commit ec9d0d6d1a

View File

@ -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 && 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,
@ -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) &&