mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
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:
committed by
Andreas Kling
parent
9540af6489
commit
a3661fd7f2
@@ -16,7 +16,8 @@ int queue_fetch_task(JS::Object& task_destination, Function<void()> algorithm)
|
||||
// FIXME: 1. If taskDestination is a parallel queue, then enqueue algorithm to taskDestination.
|
||||
|
||||
// 2. Otherwise, queue a global task on the networking task source with taskDestination and algorithm.
|
||||
return HTML::queue_global_task(HTML::Task::Source::Networking, task_destination, move(algorithm));
|
||||
auto& vm = task_destination.vm();
|
||||
return HTML::queue_global_task(HTML::Task::Source::Networking, task_destination, JS::create_heap_function(vm.heap(), move(algorithm)));
|
||||
}
|
||||
|
||||
// AD-HOC: This overload allows tracking the queued task within the fetch controller so that we may cancel queued tasks
|
||||
|
||||
Reference in New Issue
Block a user