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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2481653002: Move FeaturePolicy object to SecurityContext (Closed)
Patch Set: Created 4 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 | « third_party/WebKit/Source/core/frame/Frame.h ('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/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 031199d6675b7907a7f77c7e2eb8dc81a63a6c7d..79980d3a15af98e7e09735ee6d2db57dea23669c 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -579,9 +579,11 @@ void FrameLoader::didBeginDocument() {
if (RuntimeEnabledFeatures::featurePolicyEnabled()) {
std::unique_ptr<FeaturePolicy> featurePolicy(
FeaturePolicy::createFromParentPolicy(
- (isLoadingMainFrame()
- ? nullptr
- : m_frame->client()->parent()->getFeaturePolicy()),
+ (isLoadingMainFrame() ? nullptr
+ : m_frame->client()
+ ->parent()
+ ->securityContext()
+ ->getFeaturePolicy()),
m_frame->securityContext()->getSecurityOrigin()));
Vector<String> messages;
featurePolicy->setHeaderPolicy(
@@ -593,7 +595,7 @@ void FrameLoader::didBeginDocument() {
OtherMessageSource, ErrorMessageLevel,
"Error with Feature-Policy header: " + message));
}
- m_frame->setFeaturePolicy(std::move(featurePolicy));
+ m_frame->document()->setFeaturePolicy(std::move(featurePolicy));
}
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698