Bug 1637869 - P7. Call DisconnectChildListeners when an error occurs. r=mattwoodrow
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 28 May 2020 07:42:35 +0000
changeset 596501 3e61fd04eac7893a5a98a874ec9bb20fe218d310
parent 596500 64c0bc294d5048ce1a9e8ac02cdd5c59fa1a0271
child 596502 867528d1d35bdec48758f8aa899b0491d7ef10e5
push id13186
push userffxbld-merge
push dateMon, 01 Jun 2020 09:52:46 +0000
treeherdermozilla-beta@3e7c70a1e4a1 [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 - P7. Call DisconnectChildListeners when an error occurs. r=mattwoodrow This will allow the DocumentChannel to be removed from the loading group and the docshell to stop waiting for for the ParentProcessDocumentChannel to do something. Depends on D77201 Differential Revision: https://phabricator.services.mozilla.com/D77202
netwerk/ipc/DocumentLoadListener.cpp
--- a/netwerk/ipc/DocumentLoadListener.cpp
+++ b/netwerk/ipc/DocumentLoadListener.cpp
@@ -800,16 +800,17 @@ void DocumentLoadListener::FinishReplace
   if (mDoingProcessSwitch) {
     DisconnectChildListeners(NS_BINDING_ABORTED, NS_BINDING_ABORTED);
   }
 
   if (!mRedirectChannelId) {
     if (NS_FAILED(aResult)) {
       mChannel->Cancel(aResult);
       mChannel->Resume();
+      DisconnectChildListeners(aResult, aResult);
       return;
     }
     ApplyPendingFunctions(mChannel);
     // ResumeSuspendedChannel will be called later as RedirectToRealChannel
     // continues, so we can return early.
     return;
   }