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

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

Issue 556003006: [ServiceWorker] Check is_uninstalled in ServiceWorkerRegisterJob::ContinueWithRegistration() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move is_uninstalled_ = true; Created 6 years, 3 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
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_registration.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_register_job.cc
diff --git a/content/browser/service_worker/service_worker_register_job.cc b/content/browser/service_worker/service_worker_register_job.cc
index c19da94033910f3e1d67c28094072b7f2fd616f3..44c6f60e22f9cd71fffc30593599b88f8ff8da43 100644
--- a/content/browser/service_worker/service_worker_register_job.cc
+++ b/content/browser/service_worker/service_worker_register_job.cc
@@ -197,11 +197,12 @@ void ServiceWorkerRegisterJob::ContinueWithRegistration(
return;
}
- if (!existing_registration.get()) {
+ if (!existing_registration.get() || existing_registration->is_uninstalled()) {
RegisterAndContinue(SERVICE_WORKER_OK);
return;
}
+ DCHECK(existing_registration->GetNewestVersion());
// "If scriptURL is equal to registration.[[ScriptURL]], then:"
if (existing_registration->GetNewestVersion()->script_url() == script_url_) {
// "Set registration.[[Uninstalling]] to false."
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_registration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698