Index: third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp |
diff --git a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp |
index 9b8a0578467160ba1737dfa649a9bfbbe79b4064..f6cc6b7fa9776b6cb1587e9fa85aad20ee688457 100644 |
--- a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp |
+++ b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp |
@@ -71,7 +71,9 @@ WebParsedFeaturePolicyHeader parseFeaturePolicy(const String& policy, |
for (size_t j = 0; j < item->size(); ++j) { |
JSONObject::Entry entry = item->at(j); |
- String featureName = entry.first; |
+ WebFeaturePolicyFeature feature = getWebFeaturePolicyFeature(entry.first); |
+ if (feature == WebFeaturePolicyFeature::NotFound) |
+ continue; |
JSONArray* targets = JSONArray::cast(entry.second); |
if (!targets) { |
if (messages) |
@@ -80,7 +82,7 @@ WebParsedFeaturePolicyHeader parseFeaturePolicy(const String& policy, |
} |
WebParsedFeaturePolicyDeclaration whitelist; |
- whitelist.featureName = featureName; |
+ whitelist.feature = feature; |
Vector<WebSecurityOrigin> origins; |
String targetString; |
for (size_t j = 0; j < targets->size(); ++j) { |