Bug 1116827: Add check for null mMonitor in MessageChannel::CanSend(); r=dvander
authorAaron Klotz <aklotz@mozilla.com>
Wed, 31 Dec 2014 13:15:38 -0700
changeset 247633 dc2bd5df478e5b80a683314f10e42b13154595de
parent 247632 60bccc6ddd0818c3567f3442fb04e37c3305f691
child 247634 f9d49449c02d3c46b2fe17a956bed5f02cebe26f
child 247647 a9fa0a74542a7923320d4e74629e5a575768de3b
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1116827
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1116827: Add check for null mMonitor in MessageChannel::CanSend(); r=dvander
ipc/glue/MessageChannel.cpp
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -354,16 +354,19 @@ MessageChannel::Connected() const
     // The transport layer allows us to send messages before
     // receiving the "connected" ack from the remote side.
     return (ChannelOpening == mChannelState || ChannelConnected == mChannelState);
 }
 
 bool
 MessageChannel::CanSend() const
 {
+    if (!mMonitor) {
+        return false;
+    }
     MonitorAutoLock lock(*mMonitor);
     return Connected();
 }
 
 void
 MessageChannel::Clear()
 {
     // Don't clear mWorkerLoopID; we use it in AssertLinkThread() and