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 git-svn-id: svn://10.0.0.236/trunk@56124 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user