mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
fix antother webshell leak. Add a CleanUp method to the global window. When the global window is told it is closing,
call the CleanUp method to force it to release all of it's state. r=vidur, a=chofmann
This commit is contained in:
parent
ab9aa71baa
commit
5f4692f308
@ -181,8 +181,8 @@ GlobalWindowImpl::GlobalWindowImpl()
|
||||
mWebShell = nsnull;
|
||||
}
|
||||
|
||||
GlobalWindowImpl::~GlobalWindowImpl()
|
||||
{
|
||||
void GlobalWindowImpl::CleanUp()
|
||||
{
|
||||
NS_IF_RELEASE(mContext);
|
||||
NS_IF_RELEASE(mDocument);
|
||||
NS_IF_RELEASE(mNavigator);
|
||||
@ -200,6 +200,11 @@ GlobalWindowImpl::~GlobalWindowImpl()
|
||||
NS_IF_RELEASE(mListenerManager);
|
||||
}
|
||||
|
||||
GlobalWindowImpl::~GlobalWindowImpl()
|
||||
{
|
||||
CleanUp();
|
||||
}
|
||||
|
||||
NS_IMPL_ADDREF(GlobalWindowImpl)
|
||||
NS_IMPL_RELEASE(GlobalWindowImpl)
|
||||
|
||||
@ -1348,6 +1353,8 @@ GlobalWindowImpl::Close()
|
||||
mBrowser->Close();
|
||||
NS_RELEASE(mBrowser);
|
||||
}
|
||||
|
||||
CleanUp();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -297,6 +297,8 @@ protected:
|
||||
nsDOMWindowList *mFrames;
|
||||
|
||||
PRBool mFirstDocumentLoad;
|
||||
|
||||
void CleanUp();
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user