1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:58:11 +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:
Andreas Kling 2021-09-09 00:27:06 +02:00
parent 7bcde2bcfb
commit e0c7f8dafa
3 changed files with 16 additions and 1 deletions

View file

@ -18,6 +18,12 @@ EventLoop::~EventLoop()
{
}
void EventLoop::set_vm(JS::VM& vm)
{
VERIFY(!m_vm);
m_vm = &vm;
}
EventLoop& main_thread_event_loop()
{
return static_cast<Bindings::WebEngineCustomData*>(Bindings::main_thread_vm().custom_data())->event_loop;