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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp

Issue 424643002: Introducing the WebServiceWorkerCacheStorage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: parameter naming Created 6 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
Index: Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
index 8dc28a3cb8b5eff7da029834207451a2c5a9ded8..80a39fb8b0e323ef70127f5cbfecd9cf62fac2da 100644
--- a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
@@ -89,9 +89,9 @@ String ServiceWorkerGlobalScope::scope(ExecutionContext* context)
PassRefPtrWillBeRawPtr<CacheStorage> ServiceWorkerGlobalScope::caches(ExecutionContext* context)
{
- if (!m_cacheStorage)
- m_cacheStorage = CacheStorage::create();
- return m_cacheStorage;
+ if (!m_caches)
+ m_caches = CacheStorage::create(ServiceWorkerGlobalScopeClient::from(context)->cacheStorage());
+ return m_caches;
}
ScriptPromise ServiceWorkerGlobalScope::fetch(ScriptState* scriptState, Request* request)
@@ -173,7 +173,7 @@ const AtomicString& ServiceWorkerGlobalScope::interfaceName() const
void ServiceWorkerGlobalScope::trace(Visitor* visitor)
{
visitor->trace(m_clients);
- visitor->trace(m_cacheStorage);
+ visitor->trace(m_caches);
WorkerGlobalScope::trace(visitor);
}
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerGlobalScope.h ('k') | Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698