diff --git a/mozilla/content/base/src/nsFrameLoader.cpp b/mozilla/content/base/src/nsFrameLoader.cpp index da801e71731..356706dfbc3 100644 --- a/mozilla/content/base/src/nsFrameLoader.cpp +++ b/mozilla/content/base/src/nsFrameLoader.cpp @@ -188,7 +188,11 @@ nsFrameLoader::LoadURI(nsIURI* aURI) // Kick off the load... rv = mDocShell->LoadURI(aURI, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, PR_FALSE); - NS_ASSERTION(NS_SUCCEEDED(rv), "failed to load URL"); +#ifdef DEBUG + if (NS_FAILED(rv)) { + NS_WARNING("Failed to load the URL"); + } +#endif return rv; } diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index c665db1f164..90876eda1d5 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -3095,6 +3095,15 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI, } else { + // The prompter reqires that our private window has a document (or it + // asserts). Satisfy that assertion now since GetDocument will force + // creation of one if it hasn't already been created. + nsCOMPtr pwin(do_QueryInterface(mScriptGlobal)); + if (pwin) { + nsCOMPtr doc; + pwin->GetDocument(getter_AddRefs(doc)); + } + // Display a message box prompter->Alert(nsnull, messageStr.get()); }