|
Skip foreign fetch when the skipServiceWorker flag is set on a request.
Foreign fetch used to completely ignore the skipServiceWorker flag. Just skipping
foreign fetch whenever skipServiceWorker is true would not be correct as the flag
is both set in situations where a request needs to bypass service workers, but
also when the renderer doesn't believe the client making the request is controlled
by a service worker. In that second case foreign fetch would still need to process
the request.
To fix this, this changes skipServiceWorker to an enum with three states, in
order to distinguish between skipping all service workers (for CORS preflight,
dev-tools skip service worker, force-refresh, etc) and skipping just the
controlling service worker.
This also makes sure that (for now) any request that requires a CORS preflight
will not get intercepted by foreign fetch.
BUG= 540509, 604084
Committed: https://crrev.com/2afc5027b2ed43ddd6f26193ad8dc577a2d4b2f0
Cr-Commit-Position: refs/heads/master@{#403312}
Total comments: 8
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+182 lines, -66 lines) |
Patch |
 |
M |
content/browser/loader/resource_dispatcher_host_impl.cc
|
View
|
1
2
3
|
2 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/browser/service_worker/foreign_fetch_request_handler.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/service_worker/foreign_fetch_request_handler.cc
|
View
|
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/child/request_info.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/child/request_info.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/child/web_url_loader_impl.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/child/web_url_loader_impl.cc
|
View
|
1
2
|
3 chunks |
+9 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/child/web_url_request_util.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/child/web_url_request_util.cc
|
View
|
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/resource_messages.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/resource_request.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/common/service_worker/service_worker_types.h
|
View
|
1
2
3
|
1 chunk |
+13 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/renderer/resource_fetcher.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/fetchers/resource_fetcher_impl.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/fetchers/resource_fetcher_impl.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/pepper_url_loader_host.cc
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/render_frame_impl.cc
|
View
|
1
2
3
|
2 chunks |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/shared_worker/embedded_shared_worker_stub.cc
|
View
|
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/serviceworker/foreign-fetch-basics.html
|
View
|
1
|
3 chunks |
+37 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/foreign-fetch-worker.js
|
View
|
1
|
2 chunks |
+9 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
|
View
|
1
2
|
2 chunks |
+11 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
|
View
|
1
2
3
|
4 chunks |
+12 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/fetch/FetchManager.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/exported/WebURLRequest.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/network/ResourceRequest.h
|
View
|
1
2
3
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/network/ResourceRequest.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/network/ResourceRequestTest.cpp
|
View
|
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/public/platform/WebURLRequest.h
|
View
|
1
2
3
|
2 chunks |
+14 lines, -2 lines |
0 comments
|
Download
|
Dependent Patchsets:
Total messages: 25 (11 generated)
|