Bug 1342567. r=aosmond a=abillings
authorTimothy Nikkel <tnikkel@gmail.com>
Tue, 30 May 2017 14:49:26 -0500
changeset 361287 39f174dc2f917c2846e856f53015eba646cda76d
parent 361286 6be02a1fb56216d26e6a9ba48d448cd6bbc094e3
child 361288 34a50e140cf36d107dc3e77caa16aaa0859eb93a
push id90833
push usertnikkel@gmail.com
push dateTue, 30 May 2017 19:49:48 +0000
treeherdermozilla-inbound@39f174dc2f91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaosmond, abillings
bugs1342567
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 1342567. r=aosmond a=abillings
image/imgLoader.cpp
--- a/image/imgLoader.cpp
+++ b/image/imgLoader.cpp
@@ -2182,17 +2182,17 @@ imgLoader::LoadImage(nsIURI* aURI,
       // entry.
       if (entry->HasNoProxies()) {
         LOG_FUNC_WITH_PARAM(gImgLog,
           "imgLoader::LoadImage() adding proxyless entry", "uri", key.Spec());
         MOZ_ASSERT(!request->HasCacheEntry(),
           "Proxyless entry's request has cache entry!");
         request->SetCacheEntry(entry);
 
-        if (mCacheTracker) {
+        if (mCacheTracker && entry->GetExpirationState()->IsTracked()) {
           mCacheTracker->MarkUsed(entry);
         }
       }
 
       entry->Touch();
 
     } else {
       // We can't use this entry. We'll try to load it off the network, and if
@@ -2449,17 +2449,17 @@ imgLoader::LoadImageWithChannel(nsIChann
         if (entry->HasNoProxies()) {
           LOG_FUNC_WITH_PARAM(gImgLog,
             "imgLoader::LoadImageWithChannel() adding proxyless entry",
             "uri", key.Spec());
           MOZ_ASSERT(!request->HasCacheEntry(),
             "Proxyless entry's request has cache entry!");
           request->SetCacheEntry(entry);
 
-          if (mCacheTracker) {
+          if (mCacheTracker && entry->GetExpirationState()->IsTracked()) {
             mCacheTracker->MarkUsed(entry);
           }
         }
       }
     }
   }
 
   nsCOMPtr<nsILoadGroup> loadGroup;