LibWeb: Use HeapFunction for Platform::Timer

This commit is contained in:
Shannon Booth 2024-10-30 21:42:05 +13:00 committed by Alexander Kalenik
parent ede3c91688
commit de1a805898
Notes: github-actions[bot] 2024-10-30 19:57:21 +00:00
8 changed files with 28 additions and 18 deletions

View file

@ -54,9 +54,9 @@ void EventLoop::visit_edges(Visitor& visitor)
void EventLoop::schedule()
{
if (!m_system_event_loop_timer) {
m_system_event_loop_timer = Platform::Timer::create_single_shot(heap(), 0, [this] {
m_system_event_loop_timer = Platform::Timer::create_single_shot(heap(), 0, JS::create_heap_function(heap(), [this] {
process();
});
}));
}
if (!m_system_event_loop_timer->is_active())