mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibWeb+Browser+Ladybird: Use JS::SafeFunction for EventLoop callbacks
This automatically protects captured objects from being GC'd before the callback runs.
This commit is contained in:
@@ -51,7 +51,7 @@ EventLoop& main_thread_event_loop()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#spin-the-event-loop
|
||||
void EventLoop::spin_until(Function<bool()> goal_condition)
|
||||
void EventLoop::spin_until(JS::SafeFunction<bool()> goal_condition)
|
||||
{
|
||||
// FIXME: 1. Let task be the event loop's currently running task.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user