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:
@@ -768,6 +768,11 @@ nsWebShell::OnLinkClick(nsIContent* aContent,
|
||||
nsIInputStream* aHeadersDataStream)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "wrong thread");
|
||||
|
||||
if (mFiredUnloadEvent) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRunnable> ev =
|
||||
new OnLinkClickEvent(this, aContent, aURI, aTargetSpec,
|
||||
aPostDataStream, aHeadersDataStream);
|
||||
@@ -791,6 +796,10 @@ nsWebShell::OnLinkClickSync(nsIContent *aContent,
|
||||
*aRequest = nsnull;
|
||||
}
|
||||
|
||||
if (mFiredUnloadEvent) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
{
|
||||
// defer to an external protocol handler if necessary...
|
||||
nsCOMPtr<nsIExternalProtocolService> extProtService = do_GetService(NS_EXTERNALPROTOCOLSERVICE_CONTRACTID);
|
||||
|
||||
Reference in New Issue
Block a user