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

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

Issue 1173943002: Service Worker: Detach the controller when falling back to network on failure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | content/browser/service_worker/service_worker_url_request_job_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_url_request_job.cc
diff --git a/content/browser/service_worker/service_worker_url_request_job.cc b/content/browser/service_worker/service_worker_url_request_job.cc
index 17afffd832b3ff2034d3603455bf7516d1fec3c4..bd1abd9236ae430afa3308a252a71eb847dec0ea 100644
--- a/content/browser/service_worker/service_worker_url_request_job.cc
+++ b/content/browser/service_worker/service_worker_url_request_job.cc
@@ -490,6 +490,9 @@ void ServiceWorkerURLRequestJob::DidDispatchFetchEvent(
if (status != SERVICE_WORKER_OK) {
// TODO(falken): Add UMA and the report error to the version.
if (is_main_resource_load_) {
+ // Using the service worker failed, so fallback to network. Detach the
+ // controller so subresource requests also skip the worker.
+ provider_host_->NotifyControllerLost();
response_type_ = FALLBACK_TO_NETWORK;
NotifyRestartRequired();
} else {
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_url_request_job_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698