mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Initialize HTML::EventLoop with its type
This commit is contained in:
committed by
Andreas Kling
parent
aa4e18fca5
commit
5d8784318d
Notes:
sideshowbarker
2024-07-16 19:42:24 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/5d8784318d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/543
@@ -76,7 +76,7 @@ HTML::Script* active_script()
|
||||
});
|
||||
}
|
||||
|
||||
ErrorOr<void> initialize_main_thread_vm()
|
||||
ErrorOr<void> initialize_main_thread_vm(HTML::EventLoop::Type type)
|
||||
{
|
||||
VERIFY(!s_main_thread_vm);
|
||||
|
||||
@@ -90,7 +90,7 @@ ErrorOr<void> initialize_main_thread_vm()
|
||||
s_main_thread_vm->ref();
|
||||
|
||||
auto& custom_data = verify_cast<WebEngineCustomData>(*s_main_thread_vm->custom_data());
|
||||
custom_data.event_loop = s_main_thread_vm->heap().allocate_without_realm<HTML::EventLoop>();
|
||||
custom_data.event_loop = s_main_thread_vm->heap().allocate_without_realm<HTML::EventLoop>(type);
|
||||
|
||||
// These strings could potentially live on the VM similar to CommonPropertyNames.
|
||||
DOM::MutationType::initialize_strings();
|
||||
|
||||
Reference in New Issue
Block a user