Chromium Code Reviews| Index: Source/core/loader/DocumentThreadableLoader.cpp |
| diff --git a/Source/core/loader/DocumentThreadableLoader.cpp b/Source/core/loader/DocumentThreadableLoader.cpp |
| index 8b84b7147cada891d7ace3393be6bb007a543489..2516ff941788ef145fc92e332eda17a3f1fe2017 100644 |
| --- a/Source/core/loader/DocumentThreadableLoader.cpp |
| +++ b/Source/core/loader/DocumentThreadableLoader.cpp |
| @@ -452,7 +452,17 @@ void DocumentThreadableLoader::handleResponse(unsigned long identifier, const Re |
| return; |
| } |
| - ASSERT(!m_fallbackRequestForServiceWorker); |
| + // Even if the request met the conditions to get handled by a Service Worker |
| + // in the constructor of this class (and therefore |
| + // |m_fallbackRequestForServiceWorker| is set), the Service Worker may skip |
| + // processing the request. Only if the request is same origin, the skipped |
| + // response may come here (wasFetchedViaServiceWorker() returns false) since |
| + // such a request doesn't have to go through the CORS algorithm by calling |
| + // loadFallbackRequestForServiceWorker(). |
| + // FIXME: We should use |m_sameOriginRequest| when we will support |
| + // Suborigins for Service Worker. |
|
falken
2015/07/22 22:05:56
Can you link to a bug or make it more clear to fut
horo
2015/07/23 03:33:56
Done.
|
| + ASSERT(!m_fallbackRequestForServiceWorker || securityOrigin()->canRequest(m_fallbackRequestForServiceWorker->url())); |
| + m_fallbackRequestForServiceWorker = nullptr; |
| if (!m_sameOriginRequest && m_options.crossOriginRequestPolicy == UseAccessControl) { |
| String accessControlErrorDescription; |