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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp

Issue 2842253002: Move ReportLocalLoadFailed to ExecutionContext (Closed)
Patch Set: +comment Created 3 years, 7 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 | « third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp
index 04a20d0b3b80bebd004fc2b34394c1488102de83..2863b7f3f8838c9c92a798122429c3a5ade40549 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp
@@ -165,6 +165,14 @@ bool ResourceLoader::WillFollowRedirect(
const ResourceResponse& redirect_response(
passed_redirect_response.ToResourceResponse());
+ // For main resources, we want to ensure that every step of the redirect chain
+ // is a valid transition, so set the SecurityOrigin based on the url of the
+ // redirect source.
+ if (resource_->GetType() == Resource::kMainResource) {
+ resource_->MutableOptions().security_origin =
+ SecurityOrigin::Create(redirect_response.Url());
kinuko 2017/05/23 13:54:38 For DocumentLoader case I might prefer having this
Nate Chapin 2017/05/23 21:20:50 Moved back to DocumentLoader.
+ }
+
new_request.SetRedirectStatus(
ResourceRequest::RedirectStatus::kFollowedRedirect);
« no previous file with comments | « third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698