Bug 1465580 Make HttpChannelParent get the channel status when its underlying channel is an InterceptedHttpChannel. r=mayhemer
authorBen Kelly <ben@wanderview.com>
Fri, 01 Jun 2018 10:56:58 -0700
changeset 420931 7f4eeef07a85b27f3795a34030a16ad20675831a
parent 420930 7e6bcb2cd0d86e5468402ae680f9ce10c88b0aca
child 420932 b84e8b8c441d9870d44c2d276f67ac20e29137c5
push id34083
push userapavel@mozilla.com
push dateSat, 02 Jun 2018 23:03:25 +0000
treeherdermozilla-central@1f62ecdf59b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1465580
milestone62.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 1465580 Make HttpChannelParent get the channel status when its underlying channel is an InterceptedHttpChannel. r=mayhemer
netwerk/protocol/http/HttpChannelParent.cpp
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -1408,29 +1408,29 @@ HttpChannelParent::OnStartRequest(nsIReq
 
   // Propagate whether or not conversion should occur from the parent-side
   // channel to the child-side channel.  Then disable the parent-side
   // conversion so that it only occurs in the child.
   bool applyConversion = true;
   Unused << chan->GetApplyConversion(&applyConversion);
   chan->SetApplyConversion(false);
 
+  nsresult channelStatus = NS_OK;
+  chan->GetStatus(&channelStatus);
+
   // Keep the cache entry for future use in RecvSetCacheTokenCachedCharset().
   // It could be already released by nsHttpChannel at that time.
   nsCOMPtr<nsISupports> cacheEntry;
-  nsresult channelStatus = NS_OK;
   uint32_t cacheKey = 0;
   nsAutoCString altDataType;
 
   if (httpChannelImpl) {
     httpChannelImpl->GetCacheToken(getter_AddRefs(cacheEntry));
     mCacheEntry = do_QueryInterface(cacheEntry);
 
-    httpChannelImpl->GetStatus(&channelStatus);
-
     httpChannelImpl->GetCacheKey(&cacheKey);
 
     httpChannelImpl->GetAlternativeDataType(altDataType);
   }
 
   nsCString secInfoSerialization;
   UpdateAndSerializeSecurityInfo(secInfoSerialization);