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

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

Issue 433793002: Introducing the WebServiceWorkerCache. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: test isn't quite working 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/CacheStorage.cpp
diff --git a/Source/modules/serviceworkers/CacheStorage.cpp b/Source/modules/serviceworkers/CacheStorage.cpp
index 080745575e725b31b980345d7f652d2b8096b435..1a4db5129bdac49034d68bdcd562100f76edff29 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);
else
m_resolver->resolve(Cache::domExceptionForCacheError(*reason));
m_resolver.clear();

Powered by Google App Engine
This is Rietveld 408576698