| 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 1eda60bb6658272c61db5630d21370dbd42cf231..e61f9e8a516d1b164bc606eaff5817ee85162039 100644
|
| --- a/content/browser/service_worker/service_worker_register_job.cc
|
| +++ b/content/browser/service_worker/service_worker_register_job.cc
|
| @@ -492,8 +492,13 @@ void ServiceWorkerRegisterJob::OnStoreRegistrationComplete(
|
|
|
| // "9. If registration.waitingWorker is not null, then:..."
|
| if (registration()->waiting_version()) {
|
| - // "1. Run the [[UpdateState]] algorithm passing registration.waitingWorker
|
| - // and "redundant" as the arguments."
|
| + // 1. Set redundantWorker to registration’s waiting worker.
|
| + // 2. Terminate redundantWorker.
|
| + registration()->waiting_version()->StopWorker(
|
| + base::Bind(&ServiceWorkerUtils::NoOpStatusCallback));
|
| + // TODO(falken): Move this further down. The spec says to set status to
|
| + // 'redundant' after promoting the new version to .waiting attribute and
|
| + // 'installed' status.
|
| registration()->waiting_version()->SetStatus(
|
| ServiceWorkerVersion::REDUNDANT);
|
| }
|
|
|