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

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

Issue 224733014: Introduce ServiceWorkerHandle for tracking WebServiceWorkerImpl reference (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sigh, rebased Created 6 years, 8 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_registration.cc
diff --git a/content/browser/service_worker/service_worker_registration.cc b/content/browser/service_worker/service_worker_registration.cc
index 063e4dfd9d500ddf28f1cfaf34b8a1f486870231..1baeda7ca1a3ae11e6563a6ec8e82db356d8d3a9 100644
--- a/content/browser/service_worker/service_worker_registration.cc
+++ b/content/browser/service_worker/service_worker_registration.cc
@@ -27,18 +27,6 @@ ServiceWorkerRegistration::ServiceWorkerRegistration(
ServiceWorkerRegistration::~ServiceWorkerRegistration() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- DCHECK(is_shutdown_);
-}
-
-void ServiceWorkerRegistration::Shutdown() {
- DCHECK(!is_shutdown_);
- if (active_version_)
- active_version_->Shutdown();
- active_version_ = NULL;
- if (pending_version_)
- pending_version_->Shutdown();
- pending_version_ = NULL;
- is_shutdown_ = true;
if (context_)
context_->RemoveLiveRegistration(registration_id_);
}
@@ -61,7 +49,6 @@ ServiceWorkerVersion* ServiceWorkerRegistration::GetNewestVersion() {
void ServiceWorkerRegistration::ActivatePendingVersion() {
active_version_->SetStatus(ServiceWorkerVersion::DEACTIVATED);
- active_version_->Shutdown();
active_version_ = pending_version_;
// TODO(kinuko): This should be set to ACTIVATING until activation finishes.
active_version_->SetStatus(ServiceWorkerVersion::ACTIVE);

Powered by Google App Engine
This is Rietveld 408576698