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 d63e0e8f6e40010d74954cf174db2e3342c7301f..ce69b9ba9a8be80a5672fff4bfc324808259516f 100644 |
--- a/content/browser/service_worker/service_worker_version.cc |
+++ b/content/browser/service_worker/service_worker_version.cc |
@@ -57,9 +57,6 @@ using StatusCallback = ServiceWorkerVersion::StatusCallback; |
namespace { |
-// Time to wait until stopping an idle worker. |
-const int kIdleWorkerTimeoutSeconds = 30; |
- |
// Default delay for scheduled update. |
const int kUpdateDelaySeconds = 1; |
@@ -186,6 +183,7 @@ const int ServiceWorkerVersion::kStartInstalledWorkerTimeoutSeconds = 60; |
const int ServiceWorkerVersion::kStartNewWorkerTimeoutMinutes = 5; |
const int ServiceWorkerVersion::kRequestTimeoutMinutes = 5; |
const int ServiceWorkerVersion::kStopWorkerTimeoutSeconds = 5; |
+const int ServiceWorkerVersion::kIdleWorkerTimeoutSeconds = 30; |
void ServiceWorkerVersion::RestartTick(base::TimeTicks* time) const { |
*time = tick_clock_->NowTicks(); |
@@ -572,6 +570,8 @@ int ServiceWorkerVersion::StartRequestWithCustomTimeout( |
base::TimeTicks expiration_time = tick_clock_->NowTicks() + timeout; |
timeout_queue_.push( |
RequestInfo(request_id, event_type, expiration_time, timeout_behavior)); |
+ if (expiration_time > max_request_expiration_time_) |
+ max_request_expiration_time_ = expiration_time; |
falken
2016/11/21 08:01:48
It seems we never reset max to an earlier time (e.
|
return request_id; |
} |