Bug 1582966 - avoid double failure handling for FTP r=valentin
authorJunior Hsu <juhsu@mozilla.com>
Thu, 03 Oct 2019 08:53:23 +0000
changeset 496190 a9896a6ae8af4c96e48946b29879fdb86878331c
parent 496189 b58865500eded4a2a00b015b41408660361984f0
child 496191 033ed04462d0a9d6d6466502610ad55f94a92c14
push id36646
push usernerli@mozilla.com
push dateThu, 03 Oct 2019 21:48:01 +0000
treeherdermozilla-central@2e1bfb7458de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1582966
milestone71.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 1582966 - avoid double failure handling for FTP r=valentin Caller of `ResumeForDiversion` should respond for error handling. Otherwise, two `FailDiversion` will be fired, and the latter one is without the listener Differential Revision: https://phabricator.services.mozilla.com/D47993
netwerk/protocol/ftp/FTPChannelParent.cpp
--- a/netwerk/protocol/ftp/FTPChannelParent.cpp
+++ b/netwerk/protocol/ftp/FTPChannelParent.cpp
@@ -653,26 +653,24 @@ nsresult FTPChannelParent::ResumeForDive
       do_QueryInterface(mChannel);
   if (chan) {
     chan->MessageDiversionStop();
   }
 
   if (mSuspendedForDiversion) {
     nsresult rv = ResumeChannelInternalIfPossible();
     if (NS_WARN_IF(NS_FAILED(rv))) {
-      FailDiversion(NS_ERROR_UNEXPECTED);
       return rv;
     }
     mSuspendedForDiversion = false;
   }
 
   // Delete() will tear down IPDL, but ref from underlying nsFTPChannel will
   // keep us alive if there's more data to be delivered to listener.
   if (NS_WARN_IF(NS_FAILED(Delete()))) {
-    FailDiversion(NS_ERROR_UNEXPECTED);
     return NS_ERROR_UNEXPECTED;
   }
   return NS_OK;
 }
 
 nsresult FTPChannelParent::SuspendMessageDiversion() {
   // This only need to suspend message queue.
   mEventQ->Suspend();