Bug 1256336 - Do not use httpChannelChild after Send__delete is called. r=jduell, a=lizzard
authorDragana Damjanovic dd.mozilla@gmail.com
Thu, 24 Mar 2016 17:12:17 +0100
changeset 323627 5f567a7cba864efa075b7cbd3698b93b97b170d7
parent 323626 9bea3ad9b32f767d7d4ee2edf53a95da7424f61c
child 323628 d28c43c1f2174e5bf7f7773675be7a23ea9606e5
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjduell, lizzard
bugs1256336
milestone47.0a2
Bug 1256336 - Do not use httpChannelChild after Send__delete is called. r=jduell, a=lizzard
netwerk/protocol/http/HttpChannelChild.cpp
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -1090,22 +1090,25 @@ HttpChannelChild::FailedAsyncOpen(const 
   // We're already being called from IPDL, therefore already "async"
   HandleAsyncAbort();
 }
 
 void
 HttpChannelChild::DoNotifyListenerCleanup()
 {
   LOG(("HttpChannelChild::DoNotifyListenerCleanup [this=%p]\n", this));
-  if (mIPCOpen)
-    PHttpChannelChild::Send__delete__(this);
+
   if (mInterceptListener) {
     mInterceptListener->Cleanup();
     mInterceptListener = nullptr;
   }
+
+  if (mIPCOpen) {
+    PHttpChannelChild::Send__delete__(this);
+  }
 }
 
 class DeleteSelfEvent : public ChannelEvent
 {
  public:
   explicit DeleteSelfEvent(HttpChannelChild* child) : mChild(child) {}
   void Run() { mChild->DeleteSelf(); }
  private: