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

Unified Diff: Source/core/loader/DocumentThreadableLoader.cpp

Issue 726543008: [ServiceWorker] Fix ASSERT failure in DocumentThreadableLoader::handleResponse(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | « LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-iframe.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/DocumentThreadableLoader.cpp
diff --git a/Source/core/loader/DocumentThreadableLoader.cpp b/Source/core/loader/DocumentThreadableLoader.cpp
index 0d845c9a9ba9991c2bf73d1d829add77f8ed5a2c..0dd30deef595fc8f16cbc923729e2a4b22fdcae5 100644
--- a/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/Source/core/loader/DocumentThreadableLoader.cpp
@@ -111,9 +111,10 @@ DocumentThreadableLoader::DocumentThreadableLoader(Document& document, Threadabl
// return a opaque response which is from the other origin site and the
// script in the page can read the content.
//
- // We assume that ServiceWorker is skipped for sync requests by content/
- // code.
- if (m_async && !request.skipServiceWorker() && m_document.fetcher()->isControlledByServiceWorker()) {
+ // We assume that ServiceWorker is skipped for sync requests and non-HTTP
+ // familiy requests and OPTIONS request by content/ code.
+ // FIXME: Remove OPTIONS check when we implement "HTTP fetch" correctly.
+ if (m_async && !request.skipServiceWorker() && request.url().protocolIsInHTTPFamily() && request.httpMethod() != "OPTIONS" && m_document.fetcher()->isControlledByServiceWorker()) {
ResourceRequest newRequest(request);
// FetchRequestMode should be set by the caller. But the expected value
// of FetchRequestMode is not speced yet except for XHR. So we set here.
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/fetch-request-xhr-iframe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698