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

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

Issue 468753003: SW tests update (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 467133002 and fix test 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/ServiceWorkerRegistration.cpp
diff --git a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
index ed64100f932e181505add1178506e4b8efb8f8f9..408eba7ecb4a3868a46580ae6d40eb48586c6cbc 100644
--- a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
+++ b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
@@ -134,6 +134,7 @@ ServiceWorkerRegistration::ServiceWorkerRegistration(ExecutionContext* execution
: ActiveDOMObject(executionContext)
, m_outerRegistration(outerRegistration)
, m_provider(0)
+ , m_stopped(false)
{
ASSERT(m_outerRegistration);
ScriptWrappable::init(this);
@@ -153,4 +154,17 @@ void ServiceWorkerRegistration::trace(Visitor* visitor)
EventTargetWithInlineData::trace(visitor);
}
+bool ServiceWorkerRegistration::hasPendingActivity() const
+{
+ return !m_stopped;
+}
+
+void ServiceWorkerRegistration::stop()
+{
+ if (m_stopped)
+ return;
+ m_stopped = true;
+ m_outerRegistration->proxyStopped();
+}
+
} // namespace blink
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerRegistration.h ('k') | public/platform/WebServiceWorkerProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698