Bug 1432429 Adjust DelayQueueHTTPChannel based on whether or not Fuzzyfox is enabled 12/14 draft
authorTom Ritter <tom@mozilla.com>
Fri, 06 Jul 2018 11:23:11 -0500
changeset 826373 02044aa25c75fb9532de6beca4a6613a6ffe6a84
parent 826372 bb3e4c3816e1b74dc4d62ac8ed25bb674486988a
child 826374 92b95b6e70c09f1cf3e8532ce609fbb123e8cff5
push id118310
push userbmo:tom@mozilla.com
push dateFri, 03 Aug 2018 18:22:17 +0000
bugs1432429
milestone62.0a1
Bug 1432429 Adjust DelayQueueHTTPChannel based on whether or not Fuzzyfox is enabled 12/14 MozReview-Commit-ID: FEEgXDRpvxG
netwerk/protocol/http/DelayHttpChannelQueue.cpp
netwerk/protocol/http/nsHttpChannel.cpp
--- a/netwerk/protocol/http/DelayHttpChannelQueue.cpp
+++ b/netwerk/protocol/http/DelayHttpChannelQueue.cpp
@@ -16,16 +16,20 @@ StaticRefPtr<DelayHttpChannelQueue> sDel
 }
 
 bool
 DelayHttpChannelQueue::AttemptQueueChannel(nsHttpChannel* aChannel)
 {
   MOZ_ASSERT(aChannel);
   MOZ_ASSERT(NS_IsMainThread());
 
+  if (!TimeStamp::GetFuzzyfoxEnabled()) {
+    return false;
+  }
+
   if (!sDelayHttpChannelQueue) {
     RefPtr<DelayHttpChannelQueue> queue = new DelayHttpChannelQueue();
     if (!queue->Initialize()) {
       return false;
     }
 
     sDelayHttpChannelQueue = queue;
   }
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -6013,17 +6013,17 @@ nsHttpChannel::AsyncOpen(nsIStreamListen
     mIsPending = true;
     mWasOpened = true;
 
     mListener = listener;
     mListenerContext = context;
 
     // PauseTask/DelayHttpChannel queuing
     if (!DelayHttpChannelQueue::AttemptQueueChannel(this)) {
-        // If failed, the channel must continue.
+        // If fuzzyfox is disabled; or adding to the queue failed, the channel must continue.
         AsyncOpenFinal(TimeStamp::Now());
     }
 
     return NS_OK;
 }
 
 nsresult
 nsHttpChannel::AsyncOpenFinal(TimeStamp aTimeStamp)