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

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

Issue 272183005: Stop ServiceWorker context when no controllee is associated (and when all refs are dropped) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated, and updated tests Created 6 years, 7 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/embedded_worker_instance.cc
diff --git a/content/browser/service_worker/embedded_worker_instance.cc b/content/browser/service_worker/embedded_worker_instance.cc
index 24d2a9529a9843eb6dbf7c36e44efeabd748dd4d..891fc227989ca9cc61b708cd05c2b0be30ed8340 100644
--- a/content/browser/service_worker/embedded_worker_instance.cc
+++ b/content/browser/service_worker/embedded_worker_instance.cc
@@ -22,6 +22,8 @@ struct SecondGreater {
} // namespace
EmbeddedWorkerInstance::~EmbeddedWorkerInstance() {
+ if (status_ == STARTING || status_ == RUNNING)
michaeln 2014/05/15 19:02:20 nice catch, STARTING too
+ Stop();
registry_->RemoveWorker(process_id_, embedded_worker_id_);
}

Powered by Google App Engine
This is Rietveld 408576698