mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
Meta: Ensure the main thread VM is created before use in the CSS fuzzer
This commit is contained in:
parent
6e1b5b541a
commit
5d7a85bc37
Notes:
sideshowbarker
2024-07-16 22:46:32 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/5d7a85bc37 Pull-request: https://github.com/SerenityOS/serenity/pull/17896
1 changed files with 2 additions and 0 deletions
|
@ -17,6 +17,8 @@ Globals::Globals() { Web::Platform::EventLoopPlugin::install(*new Web::Platform:
|
|||
|
||||
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
||||
{
|
||||
MUST(Web::Bindings::initialize_main_thread_vm());
|
||||
|
||||
// FIXME: There's got to be a better way to do this "correctly"
|
||||
auto& vm = Web::Bindings::main_thread_vm();
|
||||
(void)Web::parse_css_stylesheet(Web::CSS::Parser::ParsingContext(*vm.current_realm()), { data, size });
|
||||
|
|
Loading…
Add table
Reference in a new issue