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

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

Issue 574643003: [ServiceWorker] Treat a response whose status is 0 as an error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove "always" 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 | 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_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 13af10a6f23358ccdd915d635ec5c16bc2e6d42f..ce6087de6c9d6290f30510bddd53a26c04935816 100644
--- a/content/browser/service_worker/service_worker_url_request_job.cc
+++ b/content/browser/service_worker/service_worker_url_request_job.cc
@@ -365,6 +365,12 @@ void ServiceWorkerURLRequestJob::DidDispatchFetchEvent(
// We should have a response now.
DCHECK_EQ(SERVICE_WORKER_FETCH_EVENT_RESULT_RESPONSE, fetch_result);
+ // Treat a response whose status is 0 as an error.
+ if (response.status_code == 0) {
+ DeliverErrorResponse();
+ return;
+ }
+
// Set up a request for reading the blob.
if (!response.blob_uuid.empty() && blob_storage_context_) {
scoped_ptr<storage::BlobDataHandle> blob_data_handle =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698