Bug 1360332 - Part 1: avoid calling FailDiversion() twice; r=dragana
authorLiang-Heng Chen <xeonchen@gmail.com>
Wed, 14 Jun 2017 11:59:16 +0800
changeset 596530 2e0028f316115094552961b11681d9dd79e6e421
parent 596529 69564ef15348d024c374aed89479497f13927b7c
child 596531 ae924c659c7a028b5973c04f1c359f06c57b503f
push id64675
push usermak77@bonardo.net
push dateMon, 19 Jun 2017 12:08:05 +0000
reviewersdragana
bugs1360332
milestone56.0a1
Bug 1360332 - Part 1: avoid calling FailDiversion() twice; r=dragana MozReview-Commit-ID: DxI3c3223hJ
netwerk/protocol/http/HttpChannelParent.cpp
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -1918,24 +1918,22 @@ HttpChannelParent::ResumeForDiversion()
   }
 
   mChannel->MessageDiversionStop();
 
   if (mSuspendedForDiversion) {
     // The nsHttpChannel will deliver remaining OnData/OnStop for the transfer.
     nsresult rv = mChannel->ResumeInternal();
     if (NS_WARN_IF(NS_FAILED(rv))) {
-      FailDiversion(NS_ERROR_UNEXPECTED, true);
       return rv;
     }
     mSuspendedForDiversion = false;
   }
 
   if (NS_WARN_IF(mIPCClosed || !DoSendDeleteSelf())) {
-    FailDiversion(NS_ERROR_UNEXPECTED);
     return NS_ERROR_UNEXPECTED;
   }
   return NS_OK;
 }
 
 void
 HttpChannelParent::DivertTo(nsIStreamListener *aListener)
 {