зеркало из https://github.com/mozilla/pjs.git
Fix several memory leaks. Also, use monitors around sensetive structures.
Original committer: pedemont%us.ibm.com Original revision: 1.24 Original date: 2005/02/24 23:17:36
This commit is contained in:
Родитель
6946fa4ac5
Коммит
008acb54a7
|
@ -107,11 +107,13 @@ GECKO_NATIVE(initEmbedding) (JNIEnv* env, jclass, jobject aMozBinDirectory,
|
|||
extern "C" JX_EXPORT void JNICALL
|
||||
GECKO_NATIVE(termEmbedding) (JNIEnv *env, jclass)
|
||||
{
|
||||
// Free globals before calling NS_TermEmbedding(), since we need some
|
||||
// XPCOM services.
|
||||
FreeJavaGlobals(env);
|
||||
|
||||
nsresult rv = NS_TermEmbedding();
|
||||
if (NS_FAILED(rv))
|
||||
ThrowException(env, rv, "NS_TermEmbedding failed");
|
||||
|
||||
FreeJavaGlobals(env);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -195,11 +197,13 @@ XPCOM_NATIVE(shutdownXPCOM) (JNIEnv *env, jclass, jobject aServMgr)
|
|||
}
|
||||
}
|
||||
|
||||
// Free globals before calling NS_ShutdownXPCOM(), since we need some
|
||||
// XPCOM services.
|
||||
FreeJavaGlobals(env);
|
||||
|
||||
rv = NS_ShutdownXPCOM(servMgr);
|
||||
if (NS_FAILED(rv))
|
||||
ThrowException(env, rv, "NS_ShutdownXPCOM failed");
|
||||
|
||||
FreeJavaGlobals(env);
|
||||
}
|
||||
|
||||
extern "C" JX_EXPORT jobject JNICALL
|
||||
|
|
Загрузка…
Ссылка в новой задаче