Index: third_party/WebKit/Source/modules/fetch/FetchManager.cpp |
diff --git a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp |
index edfd1021abdd8e3092f832246100ad115a3cf2cd..ba4eb25de732bf9414daed7e62f7fdd44ee67643 100644 |
--- a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp |
+++ b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp |
@@ -209,6 +209,9 @@ void FetchManager::Loader::didReceiveResponse(unsigned long, const ResourceRespo |
// origin. |
if (!SecurityOrigin::create(response.url())->isSameSchemeHostPort(m_request->origin().get())) { |
switch (m_request->mode()) { |
+ case WebURLRequest::FetchRequestModeNavigate: |
+ m_request->setResponseTainting(FetchRequestData::OpaqueTainting); |
horo
2015/10/14 10:05:31
I think this should be "ASSERT_NOT_REACHED();".
T
shiva.jm
2015/10/14 10:59:06
Done, had same opinion in patchset2, but miss read
hiroshige
2015/10/15 06:37:03
horo@,
What poses this limitation?
The current Fet
horo
2015/10/15 11:43:05
"navigate" request is created only while "Navigati
|
+ break; |
case WebURLRequest::FetchRequestModeSameOrigin: |
ASSERT_NOT_REACHED(); |
break; |
@@ -381,6 +384,13 @@ void FetchManager::Loader::start() |
return; |
} |
+ // "- |request|'s mode is |navigate|" |
+ if (m_request->mode() == WebURLRequest::FetchRequestModeNavigate) { |
+ // "The result of performing a basic fetch using |request|." |
+ performBasicFetch(); |
+ return; |
+ } |
+ |
// "- |request|'s mode is |same-origin|" |
if (m_request->mode() == WebURLRequest::FetchRequestModeSameOrigin) { |
// "A network error." |
@@ -535,6 +545,9 @@ void FetchManager::Loader::performHTTPFetch(bool corsFlag, bool corsPreflightFla |
if (corsPreflightFlag) |
threadableLoaderOptions.preflightPolicy = ForcePreflight; |
switch (m_request->mode()) { |
+ case WebURLRequest::FetchRequestModeNavigate: |
+ threadableLoaderOptions.crossOriginRequestPolicy = AllowCrossOriginRequests; |
horo
2015/10/14 10:05:31
We don't need to allow cross origin requests.
This
shiva.jm
2015/10/14 10:59:06
Done, had same opinion in patchset2, but miss read
hiroshige
2015/10/15 06:37:03
horo@,
I want to clarify why this should be DenyCr
horo
2015/10/15 11:43:05
"navigate" request is only available in ServiceWor
yhirano
2015/10/16 18:15:53
(to: horo@)
I feel it confusing. How about
- usin
horo
2015/10/19 04:08:13
Yes, we should have comments.
But I think we shoul
|
+ break; |
case WebURLRequest::FetchRequestModeSameOrigin: |
threadableLoaderOptions.crossOriginRequestPolicy = DenyCrossOriginRequests; |
break; |