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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.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 | « third_party/WebKit/Source/core/fetch/MemoryCache.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 8625e38192b69d9e95a3b2bc2312721cc125fd82..cb5d0197f91520ef8b88fb5b2797e74fefcdbd67 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -350,7 +350,10 @@ PassRefPtrWillBeRawPtr<Resource> ResourceFetcher::resourceForStaticData(const Fe
resource->setIdentifier(createUniqueIdentifier());
resource->setCacheIdentifier(cacheIdentifier);
resource->finish();
- memoryCache()->add(resource.get());
+
+ if (!substituteData.isValid())
+ memoryCache()->add(resource.get());
+
return resource.release();
}
« no previous file with comments | « third_party/WebKit/Source/core/fetch/MemoryCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698