| 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 40bbfa0569f929446f62dc205d97f5e942e63e1a..1150eaabf7e51fd43c010a11823b45b72b8d9661 100644
|
| --- a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp
|
| +++ b/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp
|
| @@ -52,16 +52,14 @@ class CacheStorage::Callbacks final
|
| ~Callbacks() override {}
|
|
|
| void onSuccess() override {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| m_resolver->resolve(true);
|
| m_resolver.clear();
|
| }
|
|
|
| void onError(WebServiceWorkerCacheError reason) override {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| if (reason == WebServiceWorkerCacheErrorNotFound)
|
| m_resolver->resolve(false);
|
| @@ -89,8 +87,7 @@ class CacheStorage::WithCacheCallbacks final
|
| ~WithCacheCallbacks() override {}
|
|
|
| void onSuccess(std::unique_ptr<WebServiceWorkerCache> webCache) override {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| Cache* cache = Cache::create(m_cacheStorage->m_scopedFetcher,
|
| wrapUnique(webCache.release()));
|
| @@ -99,8 +96,7 @@ class CacheStorage::WithCacheCallbacks final
|
| }
|
|
|
| void onError(WebServiceWorkerCacheError reason) override {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| if (reason == WebServiceWorkerCacheErrorNotFound)
|
| m_resolver->resolve();
|
| @@ -125,8 +121,7 @@ class CacheStorage::MatchCallbacks
|
| : m_resolver(resolver) {}
|
|
|
| void onSuccess(const WebServiceWorkerResponse& webResponse) override {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| ScriptState::Scope scope(m_resolver->getScriptState());
|
| m_resolver->resolve(
|
| @@ -135,8 +130,7 @@ class CacheStorage::MatchCallbacks
|
| }
|
|
|
| void onError(WebServiceWorkerCacheError reason) override {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| if (reason == WebServiceWorkerCacheErrorNotFound ||
|
| reason == WebServiceWorkerCacheErrorCacheNameNotFound)
|
| @@ -165,16 +159,14 @@ class CacheStorage::DeleteCallbacks final
|
| ~DeleteCallbacks() override {}
|
|
|
| void onSuccess() override {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| m_resolver->resolve(true);
|
| m_resolver.clear();
|
| }
|
|
|
| void onError(WebServiceWorkerCacheError reason) override {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| if (reason == WebServiceWorkerCacheErrorNotFound)
|
| m_resolver->resolve(false);
|
| @@ -200,8 +192,7 @@ class CacheStorage::KeysCallbacks final
|
| ~KeysCallbacks() override {}
|
|
|
| void onSuccess(const WebVector<WebString>& keys) override {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| Vector<String> wtfKeys;
|
| for (size_t i = 0; i < keys.size(); ++i)
|
| @@ -211,8 +202,7 @@ class CacheStorage::KeysCallbacks final
|
| }
|
|
|
| void onError(WebServiceWorkerCacheError reason) override {
|
| - if (!m_resolver->getExecutionContext() ||
|
| - m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
|
| + if (!m_resolver->getExecutionContext())
|
| return;
|
| m_resolver->reject(CacheStorageError::createException(reason));
|
| m_resolver.clear();
|
|
|