Make sure everything is still init'd in FinalizeStub

Original committer: pedemont%us.ibm.com
Original revision: 1.26
Original date: 2005/01/21 22:21:47
This commit is contained in:
pedemont%us.ibm.com 2006-09-27 15:18:51 +00:00
Родитель 53b51e7992
Коммит 9f707504fa
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -66,6 +66,7 @@ jmethodID getNameMID = nsnull;
#endif
nsJavaXPCOMBindings* gBindings = nsnull;
PRBool gJavaXPCOMInitialized = PR_FALSE;
/**************************************
@ -344,12 +345,10 @@ nsJavaXPCOMBindings::GetJavaObject(JNIEnv* env, void* aXPCOMObject,
/******************************
* InitializeJavaGlobals
******************************/
PRBool gInitialized = PR_FALSE;
PRBool
InitializeJavaGlobals(JNIEnv *env)
{
if (gInitialized)
if (gJavaXPCOMInitialized)
return PR_TRUE;
jclass clazz;
@ -438,7 +437,7 @@ InitializeJavaGlobals(JNIEnv *env)
goto init_error;
}
gInitialized = PR_TRUE;
gJavaXPCOMInitialized = PR_TRUE;
return PR_TRUE;
init_error:
@ -472,7 +471,7 @@ FreeJavaGlobals(JNIEnv* env)
gBindings = nsnull;
}
gInitialized = PR_FALSE;
gJavaXPCOMInitialized = PR_FALSE;
}