| Index: content/browser/service_worker/service_worker_context_core.cc
|
| diff --git a/content/browser/service_worker/service_worker_context_core.cc b/content/browser/service_worker/service_worker_context_core.cc
|
| index a0bbc665b4cbcdbdb437d04c5d49de1439778830..1bf42f4b5258d488947a7da324c161834e8a1a90 100644
|
| --- a/content/browser/service_worker/service_worker_context_core.cc
|
| +++ b/content/browser/service_worker/service_worker_context_core.cc
|
| @@ -750,6 +750,18 @@ int ServiceWorkerContextCore::GetVersionFailureCount(int64_t version_id) {
|
|
|
| void ServiceWorkerContextCore::OnRunningStateChanged(
|
| ServiceWorkerVersion* version) {
|
| + switch (version->running_status()) {
|
| + case EmbeddedWorkerStatus::STOPPED:
|
| + lifetime_tracker_.StopTiming(version->version_id());
|
| + break;
|
| + case EmbeddedWorkerStatus::RUNNING:
|
| + lifetime_tracker_.StartTiming(version->version_id());
|
| + break;
|
| + case EmbeddedWorkerStatus::STARTING:
|
| + case EmbeddedWorkerStatus::STOPPING:
|
| + break;
|
| + }
|
| +
|
| if (!observer_list_)
|
| return;
|
| observer_list_->Notify(FROM_HERE,
|
| @@ -846,6 +858,11 @@ void ServiceWorkerContextCore::OnControlleeRemoved(
|
| version->version_id(), provider_host->client_uuid());
|
| }
|
|
|
| +void ServiceWorkerContextCore::OnDevToolsAttached(
|
| + ServiceWorkerVersion* version) {
|
| + lifetime_tracker_.AbortTiming(version->version_id());
|
| +}
|
| +
|
| ServiceWorkerProcessManager* ServiceWorkerContextCore::process_manager() {
|
| return wrapper_->process_manager();
|
| }
|
|
|