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 413729 35d8d330b97d94eb1885400b674661d49823f39a
parent 413728 911cfe8592965b661cc38c6777654d6c66a1fb9c
child 413730 eb644e17a1a425060663da2c2196084ca6fb47de
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [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