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

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

Issue 355163002: ServiceWorker: Update worker state when waitUntil rejected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add myself to AUTHORS Created 6 years, 6 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_version.cc
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index bf866b991cec0309c5b02e4ab2a8c6b28f3a029d..2ea9c628971a70b8759926e6dfecd07c83bccc79 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -563,10 +563,12 @@ void ServiceWorkerVersion::OnActivateEventFinished(
return;
}
ServiceWorkerStatusCode status = SERVICE_WORKER_OK;
- if (result == blink::WebServiceWorkerEventResultRejected)
+ if (result == blink::WebServiceWorkerEventResultRejected) {
status = SERVICE_WORKER_ERROR_ACTIVATE_WORKER_FAILED;
- else
+ SetStatus(REDUNDANT);
+ } else {
SetStatus(ACTIVE);
+ }
scoped_refptr<ServiceWorkerVersion> protect(this);
callback->Run(status);
@@ -582,10 +584,12 @@ void ServiceWorkerVersion::OnInstallEventFinished(
return;
}
ServiceWorkerStatusCode status = SERVICE_WORKER_OK;
- if (result == blink::WebServiceWorkerEventResultRejected)
+ if (result == blink::WebServiceWorkerEventResultRejected) {
status = SERVICE_WORKER_ERROR_INSTALL_WORKER_FAILED;
- else
+ SetStatus(REDUNDANT);
+ } else {
SetStatus(INSTALLED);
+ }
scoped_refptr<ServiceWorkerVersion> protect(this);
callback->Run(status);
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698