Don't allow loads to start in a docshell that's firing the unload event. Also
don't allow document.open of the document in that docshell. Bug 371360, r=biesi, sr=jst git-svn-id: svn://10.0.0.236/trunk@228064 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2040,6 +2040,16 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
|
||||
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
}
|
||||
|
||||
// check whether we're in the middle of unload. If so, ignore this call.
|
||||
nsCOMPtr<nsIDocShell> shell = do_QueryReferent(mDocumentContainer);
|
||||
if (shell) {
|
||||
PRBool inUnload;
|
||||
shell->GetIsInUnload(&inUnload);
|
||||
if (inUnload) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
// Note: We want to use GetDocumentFromContext here because this document
|
||||
// should inherit the security information of the document that's opening us,
|
||||
// (since if it's secure, then it's presumeably trusted).
|
||||
|
||||
Reference in New Issue
Block a user