Commit 4c13846c authored by Yoichi Osato's avatar Yoichi Osato Committed by Commit Bot

Stop saving the request to |fallback_request_for_service_worker_| in ThreadableLoader.

Stop saving the request if OutOfBlinkCors is enabled.
This is because |fallback_request_for_service_worker_|
is needed only when OutOfBlinkCors is disabled.

Bug: 787704
Change-Id: Idae728e80f4b229b236790494b61c28687fdbb6b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128004
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
Reviewed-by: default avatarTakashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: default avatarTsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760387}
parent 786ff629
...@@ -319,7 +319,8 @@ void ThreadableLoader::Start(const ResourceRequest& request) { ...@@ -319,7 +319,8 @@ void ThreadableLoader::Start(const ResourceRequest& request) {
return; return;
} }
if (cors::IsCorsEnabledRequestMode(request.GetMode())) { if (!out_of_blink_cors_ &&
cors::IsCorsEnabledRequestMode(request.GetMode())) {
// Save the request to fallback_request_for_service_worker to use when the // Save the request to fallback_request_for_service_worker to use when the
// service worker doesn't handle (call respondWith()) a CORS enabled // service worker doesn't handle (call respondWith()) a CORS enabled
// request. // request.
......
...@@ -218,7 +218,7 @@ class CORE_EXPORT ThreadableLoader final ...@@ -218,7 +218,7 @@ class CORE_EXPORT ThreadableLoader final
const ResourceLoaderOptions resource_loader_options_; const ResourceLoaderOptions resource_loader_options_;
// True when feature OutOfBlinkCors is enabled (https://crbug.com/736308). // True when feature OutOfBlinkCors is enabled (https://crbug.com/736308).
bool out_of_blink_cors_; const bool out_of_blink_cors_;
// Corresponds to the CORS flag in the Fetch spec. // Corresponds to the CORS flag in the Fetch spec.
bool cors_flag_ = false; bool cors_flag_ = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment