Index: /trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
===================================================================
--- /trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp	(revision 54175)
+++ /trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp	(revision 54176)
@@ -3554,5 +3554,5 @@
   mon.Enter();
   // examine the queue
-  if (!mPendingQ.IsEmpty() && !mWaitingWorkers)
+  if (mPendingQ.Count() > mWaitingWorkers)
   {
     // wait a little while to let the workers empty the queue.
@@ -3565,5 +3565,5 @@
     mon.Enter();
     // examine the queue again
-    if (!mPendingQ.IsEmpty() && !mWaitingWorkers)
+    if (mPendingQ.Count() > mWaitingWorkers)
     {
       // we need one more worker
Index: /trunk/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcList.h
===================================================================
--- /trunk/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcList.h	(revision 54175)
+++ /trunk/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcList.h	(revision 54176)
@@ -175,4 +175,17 @@
     }
 
+    // gets count of list elements
+    PRUint32 Count()
+    {
+        T *obj = mHead;
+        PRUint32 count = 0;
+        while (obj) {
+            count++;
+            obj = obj->mNext;
+        }
+
+        return count;
+    }
+
 protected:
     void AdvanceHead()
