LibWeb: Let queue_global_task() take a JS::HeapFunction

Changes the signature of queue_global_task() from AK:Function to
JS::HeapFunction to be more clear to the user of the function that this
is what it uses internally.
This commit is contained in:
Kenneth Myhra 2024-04-16 22:04:01 +02:00 committed by Andreas Kling
parent 9540af6489
commit a3661fd7f2
Notes: sideshowbarker 2024-07-17 03:05:16 +09:00
23 changed files with 104 additions and 103 deletions

View file

@ -457,9 +457,9 @@ void Animation::cancel(ShouldInvalidate should_invalidate)
scheduled_event_time = m_timeline->convert_a_timeline_time_to_an_origin_relative_time(m_timeline->current_time());
document->append_pending_animation_event({ cancel_event, *this, scheduled_event_time });
} else {
HTML::queue_global_task(HTML::Task::Source::DOMManipulation, realm.global_object(), [this, cancel_event]() {
HTML::queue_global_task(HTML::Task::Source::DOMManipulation, realm.global_object(), JS::create_heap_function(heap(), [this, cancel_event]() {
dispatch_event(cancel_event);
});
}));
}
}