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

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

Issue 992353003: Decouple Cache Storage messaging from Service Worker/Embedded Worker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 9 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 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,

Powered by Google App Engine
This is Rietveld 408576698