mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibWeb: Make Platform::Timer GC-allocated
This will allow us to remove the use of SafeFunction in it's implementation. This requires a fair amount of plumbing to wire up the GC heap to the appropriate places in order to create the timers.
This commit is contained in:
committed by
Alexander Kalenik
parent
e44702f090
commit
ede3c91688
Notes:
github-actions[bot]
2024-10-30 19:57:28 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/ede3c916883 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2062 Reviewed-by: https://github.com/kalenikaliaksandr ✅
@@ -48,12 +48,13 @@ void EventLoop::visit_edges(Visitor& visitor)
|
||||
visitor.visit(m_currently_running_task);
|
||||
visitor.visit(m_backup_incumbent_settings_object_stack);
|
||||
visitor.visit(m_rendering_task_function);
|
||||
visitor.visit(m_system_event_loop_timer);
|
||||
}
|
||||
|
||||
void EventLoop::schedule()
|
||||
{
|
||||
if (!m_system_event_loop_timer) {
|
||||
m_system_event_loop_timer = Platform::Timer::create_single_shot(0, [this] {
|
||||
m_system_event_loop_timer = Platform::Timer::create_single_shot(heap(), 0, [this] {
|
||||
process();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user