From 625f4a34c41273ed1d3a14e3c665c75e2264fa8b Mon Sep 17 00:00:00 2001 From: "pedemont%us.ibm.com" Date: Wed, 27 Sep 2006 15:18:51 +0000 Subject: [PATCH] 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 --- extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp b/extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp index e1895f287968..561b96998870 100644 --- a/extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp +++ b/extensions/java/xpcom/src/nsJavaXPCOMBindingUtils.cpp @@ -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; }