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

Unified Diff: third_party/WebKit/Source/platform/testing/BlinkFuzzerTestSupport.h

Issue 2900373002: Remove LLVMFuzzerInitialize from many Blink fuzzers (Closed)
Patch Set: Created 3 years, 7 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/platform/testing/BlinkFuzzerTestSupport.h
diff --git a/third_party/WebKit/Source/platform/testing/BlinkFuzzerTestSupport.h b/third_party/WebKit/Source/platform/testing/BlinkFuzzerTestSupport.h
index 55bc0df931dcf10ff089d416b117a9efebd0839a..a5f0adc3b2f2eb934929743a52c28c0b56d6f187 100644
--- a/third_party/WebKit/Source/platform/testing/BlinkFuzzerTestSupport.h
+++ b/third_party/WebKit/Source/platform/testing/BlinkFuzzerTestSupport.h
@@ -7,9 +7,17 @@
namespace blink {
-// InitializeBlinkFuzzTest will spin up an environment similar to
-// webkit_unit_tests. It should be called in LLVMFuzzerInitialize.
-void InitializeBlinkFuzzTest(int* argc, char*** argv);
+// Instantiating BlinkFuzzerTestSupport will spin up an environment similar to
+// webkit_unit_tests. It should be statically initialized and leaked in fuzzers.
+class BlinkFuzzerTestSupport {
+ public:
+ // Use this constructor in LLVMFuzzerTestOneInput.
+ BlinkFuzzerTestSupport();
+
+ // Use this constructor in LLVMFuzzerInitialize only if argv is necessary.
+ BlinkFuzzerTestSupport(int argc, char** argv);
+ ~BlinkFuzzerTestSupport();
+};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698