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 a1b225b36b96dd0313f51bddc91256d684cc213f..396659c6baf89540ce2bcb49990dbcfc4ed6a428 100644 |
--- a/content/browser/service_worker/service_worker_version.cc |
+++ b/content/browser/service_worker/service_worker_version.cc |
@@ -816,7 +816,6 @@ void ServiceWorkerVersion::OnStarting() { |
void ServiceWorkerVersion::OnStarted() { |
DCHECK_EQ(RUNNING, running_status()); |
- DCHECK(cache_listener_.get()); |
RestartTick(&idle_time_); |
// Fire all start callbacks. |
@@ -877,11 +876,6 @@ void ServiceWorkerVersion::OnStopped( |
FOR_EACH_OBSERVER(Listener, listeners_, OnRunningStateChanged(this)); |
- // There should be no more communication from/to a stopped worker. Deleting |
- // the listener prevents any pending completion callbacks from causing |
- // messages to be sent to the stopped worker. |
- cache_listener_.reset(); |
- |
// Restart worker if we have any start callbacks and the worker isn't doomed. |
if (should_restart) |
StartWorkerInternal(false /* pause_after_download */); |
@@ -1461,8 +1455,6 @@ void ServiceWorkerVersion::StartWorkerInternal(bool pause_after_download) { |
if (!timeout_timer_.IsRunning()) |
StartTimeoutTimer(); |
if (running_status() == STOPPED) { |
- DCHECK(!cache_listener_.get()); |
- cache_listener_.reset(new ServiceWorkerCacheListener(this, context_)); |
embedded_worker_->Start( |
version_id_, scope_, script_url_, pause_after_download, |
base::Bind(&ServiceWorkerVersion::OnStartSentAndScriptEvaluated, |