Changeset 101923 in vbox
- Timestamp:
- Nov 7, 2023 10:10:19 AM (15 months ago)
- Location:
- trunk/src/libs/xpcom18a4/java/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/java/src/nsJavaXPCOMBindingUtils.cpp
r56603 r101923 105 105 106 106 PRBool gJavaXPCOMInitialized = PR_FALSE; 107 PRLock* gJavaXPCOMLock = nsnull;107 RTSEMFASTMUTEX gJavaXPCOMLock = NIL_RTSEMFASTMUTEX; 108 108 109 109 static const char* kJavaKeywords[] = { … … 145 145 return PR_TRUE; 146 146 147 int vrc = VINF_SUCCESS; 148 147 149 // Save pointer to JavaVM, which is valid across threads. 148 150 jint rc = env->GetJavaVM(&gCachedJVM); … … 339 341 } 340 342 341 gJavaXPCOMLock = PR_NewLock(); 343 vrc = RTSemFastMutexCreate(&gJavaXPCOMLock); 344 if (RT_FAILURE(vrc)) 345 goto init_error; 346 342 347 gJavaXPCOMInitialized = PR_TRUE; 343 348 return PR_TRUE; … … 356 361 FreeJavaGlobals(JNIEnv* env) 357 362 { 358 PRLock* tempLock = nsnull;363 RTSEMFASTMUTEX tempLock = NIL_RTSEMFASTMUTEX; 359 364 if (gJavaXPCOMLock) { 360 PR_Lock(gJavaXPCOMLock);365 RTSemFastMutexRequest(gJavaXPCOMLock); 361 366 362 367 // null out global lock so no one else can use it 363 368 tempLock = gJavaXPCOMLock; 364 gJavaXPCOMLock = nsnull;369 gJavaXPCOMLock = NIL_RTSEMFASTMUTEX; 365 370 } 366 371 … … 443 448 } 444 449 445 if (tempLock ) {446 PR_Unlock(tempLock);447 PR_DestroyLock(tempLock);450 if (tempLock != NIL_RTSEMFASTMUTEX) { 451 RTSemFastMutexRelease(tempLock); 452 RTSemFastMutexDestroy(tempLock); 448 453 } 449 454 } -
trunk/src/libs/xpcom18a4/java/src/nsJavaXPCOMBindingUtils.h
r29140 r101923 120 120 // finalizeProxy() function in nsJavaWrapper.cpp, we need to make sure that 121 121 // all the structures touched by finalizeProxy() are multithread aware. 122 extern PRLock*gJavaXPCOMLock;122 extern RTSEMFASTMUTEX gJavaXPCOMLock; 123 123 124 124 extern PRBool gJavaXPCOMInitialized;
Note:
See TracChangeset
for help on using the changeset viewer.