Bug 1432429 Adjust DelayQueueHTTPChannel based on whether or not Fuzzyfox is enabled 12/14
MozReview-Commit-ID: FEEgXDRpvxG
--- 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)