Bug 1522076 - Backed out changeset 1b6a90a3d820 a=backout
authorValentin Gosu <valentin.gosu@gmail.com>
Thu, 24 Jan 2019 11:34:17 +0200
changeset 515256 bcafba703fdb2288ad0dae247f7ec13c7bb2065a
parent 515255 03b09214ddb824f6ac926393a9e27341c43681fd
child 515257 0ba9461d93a725ceb6b13aa1e6916c752dd34d92
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1522076
milestone66.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 1522076 - Backed out changeset 1b6a90a3d820 a=backout
netwerk/protocol/http/HttpChannelChild.cpp
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -1026,20 +1026,16 @@ void HttpChannelChild::MaybeDivertOnStop
 
 void HttpChannelChild::OnStopRequest(
     const nsresult& channelStatus, const ResourceTimingStruct& timing,
     const nsHttpHeaderArray& aResponseTrailers) {
   LOG(("HttpChannelChild::OnStopRequest [this=%p status=%" PRIx32 "]\n", this,
        static_cast<uint32_t>(channelStatus)));
   MOZ_ASSERT(NS_IsMainThread());
 
-  if (mOnStopRequestCalled && !mIPCOpen) {
-    return;
-  }
-
   if (mDivertingToParent) {
     MOZ_RELEASE_ASSERT(
         !mFlushedForDiversion,
         "Should not be processing any more callbacks from parent!");
 
     SendDivertOnStopRequest(channelStatus);
     return;
   }
@@ -3789,25 +3785,16 @@ mozilla::ipc::IPCResult HttpChannelChild
 
 void HttpChannelChild::ActorDestroy(ActorDestroyReason aWhy) {
   MOZ_ASSERT(NS_IsMainThread());
 
   // OnStartRequest might be dropped if IPDL is destroyed abnormally
   // and BackgroundChild might have pending IPC messages.
   // Clean up BackgroundChild at this time to prevent memleak.
   if (aWhy != Deletion) {
-    // The actor tree might get destroyed before we get the OnStopRequest.
-    // So if we didn't get it, we send it here in order to prevent any leaks.
-    // Ocasionally we will get the OnStopRequest message after this, in which
-    // case we just ignore it as we've already cleared the listener.
-    if (!mOnStopRequestCalled && mListener) {
-      DoPreOnStopRequest(NS_ERROR_ABORT);
-      DoOnStopRequest(this, NS_ERROR_ABORT, mListenerContext);
-    }
-
     CleanupBackgroundChannel();
   }
 }
 
 mozilla::ipc::IPCResult HttpChannelChild::RecvLogBlockedCORSRequest(
     const nsString& aMessage, const nsCString& aCategory) {
   Unused << LogBlockedCORSRequest(aMessage, aCategory);
   return IPC_OK();