Bug 1256336 - Do not use httpChannelChild after Send__delete is called. r=jduell
authorDragana Damjanovic dd.mozilla@gmail.com
Thu, 24 Mar 2016 16:40:42 +0100
changeset 290314 364ea75abf26ea913e3863c880da9deb37959af0
parent 290313 d8705d309f1c18db13b1409e090dc79992c83169
child 290315 bb8b386dc367bb622c722aee2570d4f50f237966
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjduell
bugs1256336
milestone48.0a1
Bug 1256336 - Do not use httpChannelChild after Send__delete is called. r=jduell
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: