Bug 545338: Make the IPC hang detector tolerate spurious wake-ups. Possibly temporary. irc-r=jimm
authorChris Jones <jones.chris.g@gmail.com>
Wed, 10 Feb 2010 15:41:44 -0600
changeset 46654 45dcc1e10d76e1f41d4e30ad9562aaef5869f91f
parent 46653 5603d4b9af300439da13f66b6e7ab39b87e76be6
child 46655 1d9c3e67a2ac563d59f392c862bd78423a2e65a7
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs545338
milestone1.9.3a2pre
Bug 545338: Make the IPC hang detector tolerate spurious wake-ups. Possibly temporary. irc-r=jimm
ipc/glue/RPCChannel.cpp
ipc/glue/SyncChannel.cpp
--- a/ipc/glue/RPCChannel.cpp
+++ b/ipc/glue/RPCChannel.cpp
@@ -161,20 +161,17 @@ RPCChannel::Call(Message* msg, Message* 
         // here we're waiting for something to happen. see long
         // comment about the queue in RPCChannel.h
         while (!EventOccurred()) {
             bool maybeTimedOut = !RPCChannel::WaitForNotify();
 
             if (EventOccurred())
                 break;
 
-            // an event didn't occur. So we better have timed out!
-            NS_ABORT_IF_FALSE(maybeTimedOut,
-                              "neither received a reply nor detected a hang!");
-            if (!ShouldContinueFromTimeout())
+            if (maybeTimedOut && !ShouldContinueFromTimeout())
                 return false;
         }
 
         if (!Connected()) {
             ReportConnectionError("RPCChannel");
             return false;
         }
 
--- a/ipc/glue/SyncChannel.cpp
+++ b/ipc/glue/SyncChannel.cpp
@@ -109,20 +109,17 @@ SyncChannel::Send(Message* msg, Message*
         NewRunnableMethod(this, &SyncChannel::OnSend, msg));
 
     while (1) {
         bool maybeTimedOut = !SyncChannel::WaitForNotify();
 
         if (EventOccurred())
             break;
 
-        // an event didn't occur. So we better have timed out!
-        NS_ABORT_IF_FALSE(maybeTimedOut,
-                          "neither received a reply nor detected a hang!");
-        if (!ShouldContinueFromTimeout())
+        if (maybeTimedOut && !ShouldContinueFromTimeout())
             return false;
     }
 
     if (!Connected()) {
         ReportConnectionError("SyncChannel");
         return false;
     }