Bug 1637869 - P1. Cancel channel before resuming. r=mattwoodrow
☠☠ backed out by 128a2c474755 ☠ ☠
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 22 May 2020 10:30:29 +0000
changeset 531630 34389f9c86e41f0701991dd2d02729bbbedb8546
parent 531629 fa1babb9fbdabbfe550000788aa58020e43d9374
child 531631 d300b61ed89f7025a445e9bd04c3682ac65d7971
push id37441
push userapavel@mozilla.com
push dateFri, 22 May 2020 21:38:53 +0000
treeherdermozilla-central@d6abd35b54ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1637869
milestone78.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 1637869 - P1. Cancel channel before resuming. r=mattwoodrow Differential Revision: https://phabricator.services.mozilla.com/D76314
netwerk/ipc/DocumentLoadListener.cpp
--- a/netwerk/ipc/DocumentLoadListener.cpp
+++ b/netwerk/ipc/DocumentLoadListener.cpp
@@ -815,16 +815,17 @@ void DocumentLoadListener::FinishReplace
        this, aSucceeded));
 
   if (mDoingProcessSwitch) {
     DisconnectChildListeners(NS_BINDING_ABORTED, NS_BINDING_ABORTED);
   }
 
   if (!mRedirectChannelId) {
     if (!aSucceeded) {
+      mChannel->Cancel(NS_BINDING_ABORTED);
       mChannel->Resume();
       return;
     }
     ApplyPendingFunctions(mChannel);
     // ResumeSuspendedChannel will be called later as RedirectToRealChannel
     // continues, so we can return early.
     return;
   }
@@ -854,16 +855,17 @@ void DocumentLoadListener::FinishReplace
   // Release all previously registered channels, they are no longer needed to
   // be kept in the registrar from this moment.
   registrar->DeregisterChannels(mRedirectChannelId);
   mRedirectChannelId = 0;
   if (!aSucceeded) {
     if (redirectChannel) {
       redirectChannel->Delete();
     }
+    mChannel->Cancel(NS_BINDING_ABORTED);
     mChannel->Resume();
     if (auto* ctx = GetBrowsingContext()) {
       ctx->EndDocumentLoad(this);
     }
     return;
   }
 
   MOZ_ASSERT(