bug=41871

a=edburns
r=ashuk

This checkin makes it so CBrowserContainer is properly released.  The
problem was that the CBrowserContainer was still registered to the
docShell as a listener.  The solution was to call
wcIBrowserContianer::RemoveAllListeners() in the WebShellInitContext
deallocator.


git-svn-id: svn://10.0.0.236/trunk@74788 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
edburns%acm.org
2000-07-26 01:03:25 +00:00
parent 84a8753375
commit 7d07b23bb4
2 changed files with 41 additions and 3 deletions

View File

@@ -103,12 +103,24 @@ CBrowserContainer::CBrowserContainer(nsIWebBrowser *pOwner, JNIEnv *env,
if (nsnull == gVm) { // declared in jni_util.h
::util_GetJavaVM(env, &gVm); // save this vm reference away for the callback!
}
}
CBrowserContainer::~CBrowserContainer()
{
m_pOwner = nsnull;
mJNIEnv = nsnull;
mInitContext = nsnull;
mDocTarget = nsnull;
mMouseTarget = nsnull;
mDomEventTarget = nsnull;
inverseDepth = -1;
JNIEnv *env = (JNIEnv *) JNU_GetEnv(gVm, JNI_VERSION_1_2);
if (properties) {
::util_DeleteGlobalRef(env, properties);
}
properties = nsnull;
currentDOMEvent = nsnull;
}