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

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

Issue 2433773006: Remove ExecutionContext::activeDOMObjectsAreStopped()
Patch Set: Created 4 years, 2 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: 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();

Powered by Google App Engine
This is Rietveld 408576698