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

Unified Diff: third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp

Issue 2270413003: [CacheStorage] Don't store open caches in Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/modules/cachestorage/CacheStorage.h ('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/modules/cachestorage/CacheStorage.cpp
diff --git a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp b/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp
index f71b46c05c00dc9c5f9009da4fbbb53d6294bcba..c5db566af46898fb3f1ddd8fa17a4865b6e22288 100644
--- a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp
@@ -87,7 +87,6 @@ public:
if (!m_resolver->getExecutionContext() || m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
return;
Cache* cache = Cache::create(m_cacheStorage->m_scopedFetcher, wrapUnique(webCache.release()));
- m_cacheStorage->m_nameToCacheMap.set(m_cacheName, cache);
m_resolver->resolve(cache);
m_resolver.clear();
}
@@ -151,7 +150,6 @@ public:
void onSuccess() override
{
- m_cacheStorage->m_nameToCacheMap.remove(m_cacheName);
if (!m_resolver->getExecutionContext() || m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
return;
m_resolver->resolve(true);
@@ -219,12 +217,6 @@ ScriptPromise CacheStorage::open(ScriptState* scriptState, const String& cacheNa
ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
const ScriptPromise promise = resolver->promise();
- if (m_nameToCacheMap.contains(cacheName)) {
- Cache* cache = m_nameToCacheMap.find(cacheName)->value;
- resolver->resolve(cache);
- return promise;
- }
-
if (m_webCacheStorage)
m_webCacheStorage->dispatchOpen(new WithCacheCallbacks(cacheName, this, resolver), cacheName);
else
@@ -241,11 +233,6 @@ ScriptPromise CacheStorage::has(ScriptState* scriptState, const String& cacheNam
ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
const ScriptPromise promise = resolver->promise();
- if (m_nameToCacheMap.contains(cacheName)) {
- resolver->resolve(true);
- return promise;
- }
-
if (m_webCacheStorage)
m_webCacheStorage->dispatchHas(new Callbacks(resolver), cacheName);
else
@@ -339,7 +326,6 @@ void CacheStorage::dispose()
DEFINE_TRACE(CacheStorage)
{
visitor->trace(m_scopedFetcher);
- visitor->trace(m_nameToCacheMap);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/modules/cachestorage/CacheStorage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698