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

Unified Diff: content/browser/service_worker/service_worker_version.cc

Issue 2166523003: Add ref count to service workers for extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: content/browser/service_worker/service_worker_version.cc
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index ed7ae82ea0a1579398af3bf3e96a88cdf88807ee..cf2bb0bd85ce6bdfc3a3fd96e465113b4e4b7700 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -55,7 +55,7 @@ using StatusCallback = ServiceWorkerVersion::StatusCallback;
namespace {
// Time to wait until stopping an idle worker.
-const int kIdleWorkerTimeoutSeconds = 30;
+const int kIdleWorkerTimeoutSeconds = 3;
// Default delay for scheduled update.
const int kUpdateDelaySeconds = 1;
@@ -192,7 +192,7 @@ int NextTraceId() {
} // namespace
-const int ServiceWorkerVersion::kTimeoutTimerDelaySeconds = 30;
+const int ServiceWorkerVersion::kTimeoutTimerDelaySeconds = 3;
falken 2016/07/22 05:06:02 Are these timer changes just for proof of concept?
lazyboy 2016/07/26 17:45:48 Yes, these are entirely for proof of concept, espe
const int ServiceWorkerVersion::kStartInstalledWorkerTimeoutSeconds = 60;
const int ServiceWorkerVersion::kStartNewWorkerTimeoutMinutes = 5;
const int ServiceWorkerVersion::kRequestTimeoutMinutes = 5;
@@ -1412,6 +1412,7 @@ void ServiceWorkerVersion::SetTimeoutTimerInterval(base::TimeDelta interval) {
}
void ServiceWorkerVersion::OnTimeoutTimer() {
+ LOG(ERROR) << "ServiceWorkerVersion::OnTimeoutTimer";
DCHECK(running_status() == EmbeddedWorkerStatus::STARTING ||
running_status() == EmbeddedWorkerStatus::RUNNING ||
running_status() == EmbeddedWorkerStatus::STOPPING)
@@ -1518,6 +1519,7 @@ void ServiceWorkerVersion::OnPingTimeout() {
}
void ServiceWorkerVersion::StopWorkerIfIdle() {
+ LOG(ERROR) << "ServiceWorkerVersion::StopWorkerIfIdle";
if (HasWork() && !ping_controller_->IsTimedOut())
return;
if (running_status() == EmbeddedWorkerStatus::STOPPED ||

Powered by Google App Engine
This is Rietveld 408576698