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

Unified Diff: Source/web/ServiceWorkerGlobalScopeClientImpl.cpp

Issue 399543002: [ServiceWorker] Make fetch() method better conformance with the spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated falken's comment Created 6 years, 5 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 | « Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/ServiceWorkerGlobalScopeClientImpl.cpp
diff --git a/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp b/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp
index e6dc236f805a352f399f5aafa0cdd1f53d505ea6..0e644187def55602aa67eb4ae8ced486fff7e2ca 100644
--- a/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp
+++ b/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp
@@ -80,6 +80,11 @@ void ServiceWorkerGlobalScopeClientImpl::didHandleFetchEvent(int fetchEventID, P
WebServiceWorkerResponse webResponse;
response->populateWebServiceWorkerResponse(webResponse);
+ if (webResponse.status() == 0) {
+ // The status code is 0 means a network error.
+ m_client.didHandleFetchEvent(fetchEventID);
+ return;
+ }
m_client.didHandleFetchEvent(fetchEventID, webResponse);
}
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerGlobalScope.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698