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

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

Issue 1243353002: Skip the Service Worker CORS fallback for same origin requests. [1/2 blink] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « no previous file | 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 8b84b7147cada891d7ace3393be6bb007a543489..7057620cd88f5bafe4bb185c11db6eeeb774b0ea 100644
--- a/Source/core/loader/DocumentThreadableLoader.cpp
+++ b/Source/core/loader/DocumentThreadableLoader.cpp
@@ -452,7 +452,13 @@ void DocumentThreadableLoader::handleResponse(unsigned long identifier, const Re
return;
}
- ASSERT(!m_fallbackRequestForServiceWorker);
+ // |m_fallbackRequestForServiceWorker| may be set only wheh the request is
tyoshino (SeeGerritForStatus) 2015/07/22 11:25:45 wheh -> when
+ // same origin, because we skip the Service Worker CORS fallback for same
+ // origin requests.
tyoshino (SeeGerritForStatus) 2015/07/22 11:25:45 |m_fallbackRequestForServiceWorker| being set is n
horo 2015/07/22 14:28:08 Done.
+ // FIXME: We should use |m_sameOriginRequest| when we will support
+ // Suborigins for Service Worker.
+ ASSERT(!m_fallbackRequestForServiceWorker || securityOrigin()->canRequest(m_fallbackRequestForServiceWorker->url()));
+ m_fallbackRequestForServiceWorker = nullptr;
if (!m_sameOriginRequest && m_options.crossOriginRequestPolicy == UseAccessControl) {
String accessControlErrorDescription;
« 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