Bug 905448 - Don't assert when URI is wrong during loading. r=smaug

This commit is contained in:
Tom Schuster 2013-08-16 13:59:27 -04:00
parent 991ead8d61
commit a4335f8552

View File

@ -4536,10 +4536,6 @@ nsDocShell::LoadErrorPage(nsIURI *aURI, const PRUnichar *aURL,
}
else if (aURL)
{
// We need a URI object to store a session history entry, so make up a URI
nsresult rv = NS_NewURI(getter_AddRefs(mFailedURI), "about:blank");
NS_ENSURE_SUCCESS(rv, rv);
CopyUTF16toUTF8(aURL, url);
}
else
@ -8002,6 +7998,10 @@ nsDocShell::CreateContentViewer(const char *aContentType,
if (!failedURI) {
failedURI = mFailedURI;
}
if (!failedURI) {
// We need a URI object to store a session history entry, so make up a URI
NS_NewURI(getter_AddRefs(failedURI), "about:blank");
}
// When we don't have failedURI, something wrong will happen. See
// bug 291876.