Fixing bug 259117. Prevent popups when closing a window even if the close came from a user action that would normally enable popups. r=bzbarsky@mit.edu, sr=brendan@mozilla.org

git-svn-id: svn://10.0.0.236/trunk@162284 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%mozilla.jstenback.com
2004-09-14 06:03:34 +00:00
parent e80a0269c8
commit bf72233388
2 changed files with 20 additions and 8 deletions

View File

@@ -3129,11 +3129,11 @@ nsDocShell::Create()
NS_IMETHODIMP
nsDocShell::Destroy()
{
mIsBeingDestroyed = PR_TRUE;
//Fire unload event before we blow anything away.
(void) FireUnloadNotification();
mIsBeingDestroyed = PR_TRUE;
// Stop any URLs that are currently being loaded...
Stop(nsIWebNavigation::STOP_ALL);
if (mDocLoader) {
@@ -3771,10 +3771,6 @@ nsDocShell::ScrollByPages(PRInt32 numPages)
nsIScriptGlobalObject*
nsDocShell::GetScriptGlobalObject()
{
if (mIsBeingDestroyed) {
return nsnull;
}
NS_ENSURE_SUCCESS(EnsureScriptEnvironment(), nsnull);
return mScriptGlobal;