mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
Fix problem where windows would quit after closing the window
This commit is contained in:
parent
0dc38deeda
commit
ddbeb7d312
@ -34,6 +34,7 @@
|
||||
#include "nsIWebShellWindow.H"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIURL.h"
|
||||
|
||||
/* Define Class IDs */
|
||||
|
||||
static NS_DEFINE_IID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID);
|
||||
@ -193,6 +194,14 @@ nsNetSupportDialog::nsNetSupportDialog()
|
||||
Init();
|
||||
}
|
||||
|
||||
nsNetSupportDialog::~nsNetSupportDialog()
|
||||
{
|
||||
NS_IF_RELEASE( mWebShell );
|
||||
NS_IF_RELEASE( mWebShellWindow );
|
||||
NS_IF_RELEASE( mOKButton );
|
||||
NS_IF_RELEASE( mCancelButton );
|
||||
}
|
||||
|
||||
void nsNetSupportDialog::Init()
|
||||
{
|
||||
|
||||
@ -302,12 +311,6 @@ nsresult nsNetSupportDialog::DoDialog( nsString& inXULURL )
|
||||
return result;
|
||||
}
|
||||
|
||||
if ( !NS_SUCCEEDED (result = appShellService->Initialize() ) )
|
||||
{
|
||||
appShellService->Release();
|
||||
return result;
|
||||
}
|
||||
|
||||
nsIURL* dialogURL;
|
||||
if (!NS_SUCCEEDED (result = NS_NewURL(&dialogURL, inXULURL ) ) )
|
||||
{
|
||||
@ -343,7 +346,6 @@ void nsNetSupportDialog::OnOK()
|
||||
// Fill in NetLib struct
|
||||
*mReturnValue = kOKButton;
|
||||
// Cleanup
|
||||
mWebShell->Release();
|
||||
|
||||
mWebShellWindow->Close();
|
||||
}
|
||||
@ -351,7 +353,6 @@ void nsNetSupportDialog::OnOK()
|
||||
void nsNetSupportDialog::OnCancel()
|
||||
{
|
||||
*mReturnValue = kCancelButton;
|
||||
mWebShell->Release();
|
||||
mWebShellWindow->Close();
|
||||
}
|
||||
|
||||
@ -427,7 +428,6 @@ NS_IMETHODIMP nsNetSupportDialog::QueryInterface(REFNSIID aIID,void** aInstanceP
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,7 @@ class nsNetSupportDialog : public nsINetSupportDialogService, public nsIXULWind
|
||||
{
|
||||
public:
|
||||
nsNetSupportDialog();
|
||||
~nsNetSupportDialog();
|
||||
NS_IMETHOD Alert( const nsString &aText );
|
||||
NS_IMETHOD Confirm( const nsString &aText,PRInt32* returnValue );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user