bug 322773: The prompt service asserts if there our window doesn't have a document. r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@187783 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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<nsPIDOMWindow> pwin(do_QueryInterface(mScriptGlobal));
|
||||
if (pwin) {
|
||||
nsCOMPtr<nsIDOMDocument> doc;
|
||||
pwin->GetDocument(getter_AddRefs(doc));
|
||||
}
|
||||
|
||||
// Display a message box
|
||||
prompter->Alert(nsnull, messageStr.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user