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

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

Issue 433793002: Introducing the WebServiceWorkerCache. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix build Created 6 years, 3 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/CacheStorage.cpp
diff --git a/Source/modules/serviceworkers/CacheStorage.cpp b/Source/modules/serviceworkers/CacheStorage.cpp
index fd1b6bc8ad47f6b80fab75eae7f70ca1aacb8313..f9ed9227427eb75eab4f10f2ca2bd938ecb17f0e 100644
--- a/Source/modules/serviceworkers/CacheStorage.cpp
+++ b/Source/modules/serviceworkers/CacheStorage.cpp
@@ -56,6 +56,11 @@ public:
virtual void onSuccess(WebServiceWorkerCache* cache) OVERRIDE
{
+ // FIXME: Remove this once content's WebServiceWorkerCache implementation has landed.
+ if (!cache) {
+ m_resolver->reject("not implemented");
+ return;
+ }
m_resolver->resolve(Cache::fromWebServiceWorkerCache(cache));
m_resolver.clear();
}
@@ -63,7 +68,7 @@ public:
virtual void onError(WebServiceWorkerCacheError* reason) OVERRIDE
{
if (*reason == WebServiceWorkerCacheErrorNotFound)
- m_resolver->resolve();
+ m_resolver->resolve(false);
jsbell 2014/09/04 00:28:08 This makes caches.get("no such cache") resolve wit
gavinp 2014/09/04 19:47:33 Not intentional. This was merge churn.
else
m_resolver->reject(Cache::domExceptionForCacheError(*reason));
m_resolver.clear();

Powered by Google App Engine
This is Rietveld 408576698