*not part of the build*
fix for 90573 git-svn-id: svn://10.0.0.236/trunk@99224 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -40,6 +40,8 @@ PRLogModuleInfo* bcJavaGlobal::log = NULL;
|
||||
static int counter = 0;
|
||||
|
||||
JNIEnv * bcJavaGlobal::GetJNIEnv(int *detachRequired) {
|
||||
PRLogModuleInfo * l = GetLog();
|
||||
PR_LOG(l,PR_LOG_DEBUG,("--bcJavaGlobal::GetJNIEnv\n"));
|
||||
JNIEnv * env;
|
||||
int res;
|
||||
*detachRequired = 1;
|
||||
@@ -53,7 +55,7 @@ JNIEnv * bcJavaGlobal::GetJNIEnv(int *detachRequired) {
|
||||
} else {
|
||||
res = jvm->AttachCurrentThread(JNIENV &env,NULL);
|
||||
#ifdef DEBUG_idk
|
||||
printf("--bcJavaGlobal::GetJNIEnv ++counter %d\n",++counter);
|
||||
PR_LOG(l,PR_LOG_DEBUG,("--bcJavaGlobal::GetJNIEnv ++counter %d\n",++counter));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -61,11 +63,13 @@ JNIEnv * bcJavaGlobal::GetJNIEnv(int *detachRequired) {
|
||||
}
|
||||
|
||||
void bcJavaGlobal::ReleaseJNIEnv() {
|
||||
PRLogModuleInfo * l = GetLog();
|
||||
PR_LOG(l,PR_LOG_DEBUG,("--bcJavaGlobal::ReleaseJNIEnv\n"));
|
||||
int res;
|
||||
if (jvm) {
|
||||
res = jvm->DetachCurrentThread();
|
||||
#ifdef DEBUG_idk
|
||||
printf("--bcJavaGlobal::ReleaseJNIEnv --counter %d\n",--counter);
|
||||
PR_LOG(l,PR_LOG_DEBUG,("--bcJavaGlobal::ReleaseJNIEnv --counter %d\n",--counter));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,6 +198,7 @@ NS_IMETHODIMP bcJavaStubsAndProxies::GetOID(char *location, bcOID *oid) {
|
||||
//location[strlen(location)-5] = 0; //nb dirty hack. location is xyz.jar.info
|
||||
strcpy(location + strlen(location)-4,"comp");
|
||||
jstring jstr = env->NewStringUTF(location);
|
||||
strcpy(location + strlen(location)-4,"info");
|
||||
jobject object = env->CallStaticObjectMethod(componentLoader, loadComponentID, jstr);
|
||||
bcIStub *stub = new bcJavaStub(object);
|
||||
NS_WITH_SERVICE(bcIORBComponent,_orb,kORBComponent,&result);
|
||||
|
||||
Reference in New Issue
Block a user