Index: third_party/WebKit/Source/core/fetch/MemoryCache.cpp |
diff --git a/third_party/WebKit/Source/core/fetch/MemoryCache.cpp b/third_party/WebKit/Source/core/fetch/MemoryCache.cpp |
index a0de01441465ee86da4cb6e7bafad6c0ef50e6d1..65a9b21b32677c5a92fbba4a70b0c519703810d8 100644 |
--- a/third_party/WebKit/Source/core/fetch/MemoryCache.cpp |
+++ b/third_party/WebKit/Source/core/fetch/MemoryCache.cpp |
@@ -288,8 +288,12 @@ void MemoryCache::pruneDeadResources(PruneStrategy strategy) |
size_t capacity = deadCapacity(); |
if (strategy == MaximalPrune) |
capacity = 0; |
- if (!m_deadSize || (capacity && m_deadSize <= capacity)) |
- return; |
+ |
+ // Now pruneDeadResources needs to check all resources when the strategy is Maximal |
+ if (strategy != MaximalPrune) { |
+ if (!m_deadSize || (capacity && m_deadSize <= capacity)) |
+ return; |
+ } |
size_t targetSize = static_cast<size_t>(capacity * cTargetPrunePercentage); // Cut by a percentage to avoid immediately pruning again. |
@@ -315,6 +319,12 @@ void MemoryCache::pruneDeadResources(PruneStrategy strategy) |
continue; |
} |
+ if (strategy == MaximalPrune) { |
+ if (!resource->isPreloaded() && resource->isLoaded() && resource->isReloadable()) { |
+ resource->myPrune(); |
+ } |
+ } |
+ |
if (!resource->isAlive() && !resource->isPreloaded() && resource->isLoaded()) { |
// Destroy our decoded data. This will remove us from |
// m_liveDecodedResources, and possibly move us to a different |