Bug 1342360 - "Crash in mozilla::net::WyciwygChannelParent::ActorDestroy". r=valentin, a=lizzard
authorMichal Novotny <michal.novotny@gmail.com>
Thu, 02 Mar 2017 05:00:00 +0800
changeset 395608 9dcd8fb79239165319bd9e94b434e2fe933268d0
parent 395607 bbbe973da6434f01522e195d79ff49cc74c6d4d0
child 395609 443b578c9cbaa5239c3e22d10d63012086b8e6d4
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin, lizzard
bugs1342360
milestone54.0a2
Bug 1342360 - "Crash in mozilla::net::WyciwygChannelParent::ActorDestroy". r=valentin, a=lizzard
netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
--- a/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
+++ b/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp
@@ -34,17 +34,19 @@ WyciwygChannelParent::~WyciwygChannelPar
 void
 WyciwygChannelParent::ActorDestroy(ActorDestroyReason why)
 {
   // We may still have refcount>0 if the channel hasn't called OnStopRequest
   // yet, but we must not send any more msgs to child.
   mIPCClosed = true;
 
   // We need to force the cycle to break here
-  mChannel->SetNotificationCallbacks(nullptr);
+  if (mChannel) {
+    mChannel->SetNotificationCallbacks(nullptr);
+  }
 }
 
 //-----------------------------------------------------------------------------
 // WyciwygChannelParent::nsISupports
 //-----------------------------------------------------------------------------
 
 NS_IMPL_ISUPPORTS(WyciwygChannelParent,
                   nsIStreamListener,