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

Unified Diff: third_party/WebKit/Source/platform/feature_policy/FeaturePolicyFuzzer.cpp

Issue 2520223002: Replicate a parsed feature policy representation so it doesn't need to be parsed in the browser pro… (Closed)
Patch Set: Replicate a parsed feature policy representation so it doesn't need to be parsed in the browser pro… Created 4 years 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/platform/feature_policy/FeaturePolicyFuzzer.cpp
diff --git a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicyFuzzer.cpp b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicyFuzzer.cpp
index e64189576fa3eeb481d3cf5bd0c3e0913697790a..041a414aad93d295ff57f31419beb25e839a3ce9 100644
--- a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicyFuzzer.cpp
+++ b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicyFuzzer.cpp
@@ -17,9 +17,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
WTF::Vector<WTF::String> messages;
RefPtr<blink::SecurityOrigin> origin =
blink::SecurityOrigin::createFromString("https://example.com/");
- std::unique_ptr<blink::FeaturePolicy> policy =
- blink::FeaturePolicy::createFromParentPolicy(nullptr, origin);
- policy->setHeaderPolicy(WTF::String(data, size), &messages);
+ blink::FeaturePolicy::parseFeaturePolicy(WTF::String(data, size),
+ origin.get(), &messages);
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698