diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-09 00:27:06 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-09 02:18:31 +0200 |
commit | e0c7f8dafa5c5f6168c41ccf2986cffec86bf038 (patch) | |
tree | 709ee7b4c90f1aa2151f2e5dd71ae208b9c2980f /Userland/Libraries/LibWeb/Bindings | |
parent | 7bcde2bcfb7c993d81cb8cd7b9e0f40fc821d61c (diff) | |
download | serenity-e0c7f8dafa5c5f6168c41ccf2986cffec86bf038.zip |
LibWeb: Give HTML::EventLoop a pointer to the JS::VM
This will be required for event loop processing.
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings')
-rw-r--r-- | Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp b/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp index cfdf20bf4a..0f17296c8b 100644 --- a/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp +++ b/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp @@ -12,8 +12,10 @@ namespace Web::Bindings { JS::VM& main_thread_vm() { static RefPtr<JS::VM> vm; - if (!vm) + if (!vm) { vm = JS::VM::create(make<WebEngineCustomData>()); + static_cast<WebEngineCustomData*>(vm->custom_data())->event_loop.set_vm(*vm); + } return *vm; } |