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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp

Issue 2552993002: Rename activeDOMObjectsAreStopped to isContextDestroyed (Closed)
Patch Set: Created 4 years 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/serviceworkers/ServiceWorkerContainer.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
index 4dd20215f9464f89778892f0394d1c22daa38a33..a76c24b76a5cec64d2268ebd67691807032b2922 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
@@ -72,7 +72,7 @@ class RegistrationCallback
void onSuccess(
std::unique_ptr<WebServiceWorkerRegistration::Handle> handle) override {
if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ m_resolver->getExecutionContext()->isContextDestroyed())
return;
m_resolver->resolve(ServiceWorkerRegistration::getOrCreate(
m_resolver->getExecutionContext(), wrapUnique(handle.release())));
@@ -80,7 +80,7 @@ class RegistrationCallback
void onError(const WebServiceWorkerError& error) override {
if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ m_resolver->getExecutionContext()->isContextDestroyed())
return;
ScriptState::Scope scope(m_resolver->getScriptState());
if (error.errorType == WebServiceWorkerError::ErrorTypeType) {
@@ -109,7 +109,7 @@ class GetRegistrationCallback : public WebServiceWorkerProvider::
std::unique_ptr<WebServiceWorkerRegistration::Handle> handle =
wrapUnique(webPassHandle.release());
if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ m_resolver->getExecutionContext()->isContextDestroyed())
return;
if (!handle) {
// Resolve the promise with undefined.
@@ -122,7 +122,7 @@ class GetRegistrationCallback : public WebServiceWorkerProvider::
void onError(const WebServiceWorkerError& error) override {
if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ m_resolver->getExecutionContext()->isContextDestroyed())
return;
m_resolver->reject(ServiceWorkerError::take(m_resolver.get(), error));
}
@@ -150,7 +150,7 @@ class GetRegistrationsCallback : public WebServiceWorkerProvider::
}
if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ m_resolver->getExecutionContext()->isContextDestroyed())
return;
m_resolver->resolve(
ServiceWorkerRegistrationArray::take(m_resolver.get(), &handles));
@@ -158,7 +158,7 @@ class GetRegistrationsCallback : public WebServiceWorkerProvider::
void onError(const WebServiceWorkerError& error) override {
if (!m_resolver->getExecutionContext() ||
- m_resolver->getExecutionContext()->activeDOMObjectsAreStopped())
+ m_resolver->getExecutionContext()->isContextDestroyed())
return;
m_resolver->reject(ServiceWorkerError::take(m_resolver.get(), error));
}
@@ -181,7 +181,7 @@ class ServiceWorkerContainer::GetRegistrationForReadyCallback
ASSERT(m_ready->getState() == ReadyProperty::Pending);
if (m_ready->getExecutionContext() &&
- !m_ready->getExecutionContext()->activeDOMObjectsAreStopped())
+ !m_ready->getExecutionContext()->isContextDestroyed())
m_ready->resolve(ServiceWorkerRegistration::getOrCreate(
m_ready->getExecutionContext(), wrapUnique(handle.release())));
}

Powered by Google App Engine
This is Rietveld 408576698