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 815071 265a65951a1ba3b4ce055e3a72d641e91f36bc3c
parent 815070 c95d37a17c2a77c22ca3bf90d3ac51f43606ffe5
child 815072 6761a23480e8d7f643c118376591f47590e6c620
push id115424
push userbmo:tom@mozilla.com
push dateFri, 06 Jul 2018 17:03:34 +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)