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

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

Issue 2739203002: Initial Implementation of Iframe Attribute for Feature Policy (Part 3) (Closed)
Patch Set: Clean up after rebase Created 3 years, 9 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
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 13857db271a9005fbcfd277261654baa7bd4495b..fae95aa93bc7334ed9104d426518f7fff5f54a71 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -617,8 +617,13 @@ void FrameLoader::didBeginDocument() {
const WebParsedFeaturePolicy& parsedHeader = parseFeaturePolicy(
featurePolicyHeader, m_frame->securityContext()->getSecurityOrigin(),
&messages);
- m_frame->securityContext()->initializeFeaturePolicy(parsedHeader,
- parentFeaturePolicy);
+ const WebParsedFeaturePolicy& containerPolicy =
+ getContainerPolicyFromAllowedFeatures(
+ m_frame->owner()->allowedFeatures(),
dglazkov 2017/03/20 16:49:50 It crashes here.
lunalu1 2017/03/20 20:50:09 Thanks! My bad, frame owner doesn't always exit.
+ m_frame->securityContext()->getSecurityOrigin());
+
+ m_frame->securityContext()->initializeFeaturePolicy(
+ parsedHeader, containerPolicy, parentFeaturePolicy);
for (auto& message : messages) {
m_frame->document()->addConsoleMessage(ConsoleMessage::create(
OtherMessageSource, ErrorMessageLevel,

Powered by Google App Engine
This is Rietveld 408576698