mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
LibWeb: Give HTML::EventLoop a pointer to the JS::VM
This will be required for event loop processing.
This commit is contained in:
parent
7bcde2bcfb
commit
e0c7f8dafa
3 changed files with 16 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue