From 8b26a0b9b1e852cfb3973a44e3441bc0221d9c2c Mon Sep 17 00:00:00 2001 From: Valentin Gosu Date: Wed, 6 Sep 2017 10:24:01 +0200 Subject: [PATCH] Bug 1396307 - Make sure we only set mRaceCacheWithNetwork to true when the feature is enabled r=michal MozReview-Commit-ID: FrLjfuExmYV --HG-- extra : rebase_source : 21ec1409444b202fcb73aee8b8d04475c5179679 --- netwerk/protocol/http/nsHttpChannel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index fe7002a97e74..ca8cf200bc4f 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -3976,7 +3976,7 @@ nsHttpChannel::OpenCacheEntry(bool isHttps) MOZ_ASSERT(NS_IsMainThread(), "Should be called on the main thread"); mCacheAsyncOpenCalled = true; if (mNetworkTriggered) { - mRaceCacheWithNetwork = true; + mRaceCacheWithNetwork = sRCWNEnabled; } rv = cacheStorage->AsyncOpenURI(openURI, extension, cacheEntryOpenFlags, this); } else { @@ -9387,7 +9387,7 @@ nsHttpChannel::TriggerNetwork() } if (mCacheAsyncOpenCalled && !mOnCacheAvailableCalled) { - mRaceCacheWithNetwork = true; + mRaceCacheWithNetwork = sRCWNEnabled; } LOG((" triggering network\n"));