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

Unified Diff: Source/core/fetch/FetchRequest.cpp

Issue 47923008: Block execution of failed 'crossorigin' <script>s. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 7 years, 1 month 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 | « Source/core/fetch/FetchRequest.h ('k') | Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/FetchRequest.cpp
diff --git a/Source/core/fetch/FetchRequest.cpp b/Source/core/fetch/FetchRequest.cpp
index d8d95121899b34dd7a13566eb2d03f24a81c3e68..ef7ca2235ded45c39c45de628f594e9422e712f5 100644
--- a/Source/core/fetch/FetchRequest.cpp
+++ b/Source/core/fetch/FetchRequest.cpp
@@ -40,6 +40,7 @@ FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const AtomicS
, m_priority(priority)
, m_forPreload(false)
, m_defer(NoDefer)
+ , m_originRestriction(UseDefaultOriginRestrictionForType)
{
m_options.initiatorInfo.name = initiator;
}
@@ -50,6 +51,7 @@ FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const AtomicS
, m_priority(ResourceLoadPriorityUnresolved)
, m_forPreload(false)
, m_defer(NoDefer)
+ , m_originRestriction(UseDefaultOriginRestrictionForType)
{
m_options.initiatorInfo.name = initiator;
}
@@ -60,6 +62,7 @@ FetchRequest::FetchRequest(const ResourceRequest& resourceRequest, const FetchIn
, m_priority(ResourceLoadPriorityUnresolved)
, m_forPreload(false)
, m_defer(NoDefer)
+ , m_originRestriction(UseDefaultOriginRestrictionForType)
{
m_options.initiatorInfo = initiator;
}
@@ -68,11 +71,9 @@ FetchRequest::~FetchRequest()
{
}
-void FetchRequest::setPotentiallyCrossOriginEnabled(SecurityOrigin* origin, StoredCredentials allowCredentials)
+void FetchRequest::setCrossOriginAccessControl(SecurityOrigin* origin, StoredCredentials allowCredentials)
{
updateRequestForAccessControl(m_resourceRequest, origin, allowCredentials);
- ASSERT(m_options.requestOriginPolicy == UseDefaultOriginRestrictionsForType); // Allows only tightening from the default value.
- m_options.requestOriginPolicy = PotentiallyCrossOriginEnabled;
}
} // namespace WebCore
« no previous file with comments | « Source/core/fetch/FetchRequest.h ('k') | Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698