Commit 9668224f authored by Istiaque Ahmed's avatar Istiaque Ahmed Committed by Commit Bot

SW: Ignore setting phase when a register job is already COMPLETE.

Calling StopAllServiceWorkersForOrigin and DeleteForOrigin on a SW
context can result in ServiceWorkerRegisterJob::OnStartWorkerFinished
for a job that is already in COMPLETE phase.

This CL bails out setting phase in this case.

Bug: 1031764
Change-Id: I863320d4dbf8606c52d8e55af017dae05d011d4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1959525
Commit-Queue: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#723501}
parent 325add34
......@@ -550,6 +550,11 @@ void ServiceWorkerRegisterJob::UpdateAndContinue() {
void ServiceWorkerRegisterJob::OnStartWorkerFinished(
blink::ServiceWorkerStatusCode status) {
// Bail out early if the job has already completed.
// See https://crbug.com/1031764 for details.
if (phase_ == COMPLETE)
return;
BumpLastUpdateCheckTimeIfNeeded();
if (status == blink::ServiceWorkerStatusCode::kOk) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment