Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(904)

Unified Diff: third_party/WebKit/Source/core/fetch/MemoryCache.cpp

Issue 1748723002: Do not add Resource for SubstituteData to MemoryCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SVG_0_preCacheData
Patch Set: Remove special case for substitute data in MemoryCache::prune() Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5353407933d174c0b08b478aa916d080f3708c48..d1069a8fd4ebddadca862e56c4ae0bc5a6e95249 100644
--- a/third_party/WebKit/Source/core/fetch/MemoryCache.cpp
+++ b/third_party/WebKit/Source/core/fetch/MemoryCache.cpp
@@ -669,12 +669,8 @@ void MemoryCache::prune(Resource* justReleasedResource)
// objects O(N^2) if we pruned immediately. This immediate eviction is a
// safeguard against runaway memory consumption by dead resources
// while a prune is pending.
- // Main Resources in the cache are only substitue data that was
- // precached and should not be evicted.
- if (justReleasedResource->getType() != Resource::MainResource) {
- if (MemoryCacheEntry* entry = getEntryForResource(justReleasedResource))
- evict(entry);
- }
+ if (MemoryCacheEntry* entry = getEntryForResource(justReleasedResource))
+ evict(entry);
// As a last resort, prune immediately
if (m_deadSize > m_maxDeferredPruneDeadCapacity)
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698