Bug 1371260 - Allow fetchCount/lastFetched to be read when either cache or alt-data cache entry is available. r=valentin
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Fri, 09 Jun 2017 13:52:52 +0000
changeset 411371 35d8d330b97d94eb1885400b674661d49823f39a
parent 411370 911cfe8592965b661cc38c6777654d6c66a1fb9c
child 411372 eb644e17a1a425060663da2c2196084ca6fb47de
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvalentin
bugs1371260
milestone55.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 1371260 - Allow fetchCount/lastFetched to be read when either cache or alt-data cache entry is available. r=valentin
netwerk/protocol/http/HttpChannelChild.cpp
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -2680,29 +2680,29 @@ HttpChannelChild::SetupFallbackChannel(c
 //-----------------------------------------------------------------------------
 // HttpChannelChild::nsICacheInfoChannel
 //-----------------------------------------------------------------------------
 
 NS_IMETHODIMP
 HttpChannelChild::GetCacheTokenFetchCount(int32_t *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
-  if (!mCacheEntryAvailable || !mAltDataCacheEntryAvailable) {
+  if (!mCacheEntryAvailable && !mAltDataCacheEntryAvailable) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   *_retval = mCacheFetchCount;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 HttpChannelChild::GetCacheTokenLastFetched(uint32_t *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
-  if (!mCacheEntryAvailable || !mAltDataCacheEntryAvailable) {
+  if (!mCacheEntryAvailable && !mAltDataCacheEntryAvailable) {
     return NS_ERROR_NOT_AVAILABLE;
   }
 
   *_retval = mCacheLastFetched;
   return NS_OK;
 }
 
 NS_IMETHODIMP