Index: trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
===================================================================
--- trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp	(revision 101923)
+++ trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp	(revision 101924)
@@ -2400,5 +2400,5 @@
     // mCachedISupports, but NSPR doesn't provide cross-platform cmpxchg
     // functionality, so we have to use a shared lock instead...
-    PR_Lock(dConnect->StubQILock());
+    RTSemFastMutexRequest(dConnect->StubQILock());
 
     // check if we have already got a nsISupports stub for this object
@@ -2408,5 +2408,5 @@
       NS_ADDREF(mCachedISupports);
 
-      PR_Unlock(dConnect->StubQILock());
+      RTSemFastMutexRelease(dConnect->StubQILock());
       return NS_OK;
     }
@@ -2429,5 +2429,5 @@
         mCachedISupports = this;
 
-        PR_Unlock(dConnect->StubQILock());
+        RTSemFastMutexRelease(dConnect->StubQILock());
         return NS_OK;
       }
@@ -2476,5 +2476,5 @@
     }
 
-    PR_Unlock(dConnect->StubQILock());
+    RTSemFastMutexRelease(dConnect->StubQILock());
   }
 
@@ -3009,8 +3009,8 @@
 
 ipcDConnectService::ipcDConnectService()
- : mLock(NULL)
- , mStubLock(NULL)
+ : mLock(NIL_RTSEMFASTMUTEX)
+ , mStubLock(NIL_RTSEMFASTMUTEX)
  , mDisconnected(PR_TRUE)
- , mStubQILock(NULL)
+ , mStubQILock(NIL_RTSEMFASTMUTEX)
 #if defined(DCONNECT_WITH_IPRT_REQ_POOL)
  , mhReqPool(NIL_RTREQPOOL)
@@ -3048,7 +3048,11 @@
 
   mInstance = nsnull;
-  PR_DestroyLock(mStubQILock);
-  PR_DestroyLock(mStubLock);
-  PR_DestroyLock(mLock);
+  if (mStubQILock != NIL_RTSEMFASTMUTEX)
+    RTSemFastMutexDestroy(mStubQILock);
+  if (mStubLock != NIL_RTSEMFASTMUTEX)
+    RTSemFastMutexDestroy(mStubLock);
+  if (mLock != NIL_RTSEMFASTMUTEX)
+    RTSemFastMutexDestroy(mLock);
+
 #if defined(DCONNECT_WITH_IPRT_REQ_POOL)
   RTReqPoolRelease(mhReqPool);
@@ -3074,6 +3078,6 @@
     return rv;
 
-  mLock = PR_NewLock();
-  if (!mLock)
+  int vrc = RTSemFastMutexCreate(&mLock);
+  if (RT_FAILURE(vrc))
     return NS_ERROR_OUT_OF_MEMORY;
 
@@ -3083,6 +3087,6 @@
     return NS_ERROR_OUT_OF_MEMORY;
 
-  mStubLock = PR_NewLock();
-  if (!mStubLock)
+  vrc = RTSemFastMutexCreate(&mStubLock);
+  if (RT_FAILURE(vrc))
     return NS_ERROR_OUT_OF_MEMORY;
 
@@ -3094,6 +3098,6 @@
     return rv;
 
-  mStubQILock = PR_NewLock();
-  if (!mStubQILock)
+  vrc = RTSemFastMutexCreate(&mStubQILock);
+  if (RT_FAILURE(vrc))
     return NS_ERROR_OUT_OF_MEMORY;
 
@@ -3332,5 +3336,5 @@
 {
   if (!locked)
-    PR_Lock(mLock);
+    RTSemFastMutexRequest(mLock);
 
 #ifdef IPC_LOGGING
@@ -3348,5 +3352,5 @@
 
   if (!locked)
-    PR_Unlock(mLock);
+    RTSemFastMutexRelease(mLock);
 }
 
Index: trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.h
===================================================================
--- trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.h	(revision 101923)
+++ trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.h	(revision 101924)
@@ -258,6 +258,6 @@
   NS_HIDDEN_(PRBool)   CheckInstanceAndAddRef(DConnectInstance *, PRUint32);
 
-  PRLock *StubLock() { return mStubLock; }
-  PRLock *StubQILock() { return mStubQILock; }
+  RTSEMFASTMUTEX StubLock() { return mStubLock; }
+  RTSEMFASTMUTEX StubQILock() { return mStubQILock; }
 
   static nsRefPtr <ipcDConnectService> GetInstance() {
@@ -295,5 +295,5 @@
 
   // lock to protect access to instance sets and the disconnected flag
-  PRLock *mLock;
+  RTSEMFASTMUTEX mLock;
 
   // table of local object instances allocated on behalf of a peer
@@ -306,5 +306,5 @@
   // lock to protect access to mStubs and DConnectStub::mRefCntLevels
   // (also guards every DConnectStub::Release call to provide atomicity)
-  PRLock *mStubLock;
+  RTSEMFASTMUTEX mStubLock;
 
   // table of remote object stubs allocated to communicate with peer's instances
@@ -324,5 +324,5 @@
   // (we cannot use mStubLock because it isn't supposed to be held long,
   // like in case of an IPC call and such)
-  PRLock *mStubQILock;
+  RTSEMFASTMUTEX mStubQILock;
 
 #if defined(DCONNECT_MULTITHREADED)
