mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 10:09:14 +00:00
LibWeb: Accept JS::HeapFunction when queuing a media element task
This opens up the possibility of easier memory management in future changes.
This commit is contained in:
parent
177e5210e0
commit
7b76438d57
Notes:
github-actions[bot]
2024-10-15 08:03:22 +00:00
Author: https://github.com/gmta
Commit: 7b76438d57
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1802
Reviewed-by: https://github.com/awesomekling ✅
Reviewed-by: https://github.com/shannonbooth
3 changed files with 18 additions and 18 deletions
|
@ -114,10 +114,10 @@ WebIDL::ExceptionOr<void> BaseAudioContext::verify_audio_options_inside_nominal_
|
|||
return {};
|
||||
}
|
||||
|
||||
void BaseAudioContext::queue_a_media_element_task(Function<void()> steps)
|
||||
void BaseAudioContext::queue_a_media_element_task(JS::NonnullGCPtr<JS::HeapFunction<void()>> steps)
|
||||
{
|
||||
auto task = HTML::Task::create(vm(), m_media_element_event_task_source.source, HTML::current_settings_object().responsible_document(), JS::create_heap_function(heap(), move(steps)));
|
||||
HTML::main_thread_event_loop().task_queue().add(move(task));
|
||||
auto task = HTML::Task::create(vm(), m_media_element_event_task_source.source, HTML::current_settings_object().responsible_document(), steps);
|
||||
HTML::main_thread_event_loop().task_queue().add(task);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue