mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-09 04:32:51 +00:00
LibWeb: Use HeapFunction for Platform::Timer
This commit is contained in:
parent
ede3c91688
commit
de1a805898
Notes:
github-actions[bot]
2024-10-30 19:57:21 +00:00
Author: https://github.com/shannonbooth
Commit: de1a805898
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2062
Reviewed-by: https://github.com/kalenikaliaksandr ✅
8 changed files with 28 additions and 18 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue