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 38110 d19be3f707cb6d35848dd8eb5dc04451bb362b2b
parent 38109 425bd6cb3e216fdbea85b1920c0070e0b6abfc5f
child 38111 35394656718894a3b46f41c36e690bf3ef8ce0fb
push id11617
push usercjones@mozilla.com
push dateFri, 12 Feb 2010 05:46:47 +0000
treeherdermozilla-central@c5ca3076da1b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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;
     }