mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 16:28:48 +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:
parent
9540af6489
commit
a3661fd7f2
Notes:
sideshowbarker
2024-07-17 03:05:16 +09:00
Author: https://github.com/kennethmyhra
Commit: a3661fd7f2
Pull-request: https://github.com/SerenityOS/serenity/pull/24026
23 changed files with 104 additions and 103 deletions
|
@ -625,12 +625,12 @@ void fetch_single_module_script(JS::Realm& realm,
|
|||
// then queue a task on the networking task source to proceed with running the following steps.
|
||||
if (module_map.is_fetching(url, module_type)) {
|
||||
module_map.wait_for_change(realm.heap(), url, module_type, [on_complete, &realm](auto entry) -> void {
|
||||
HTML::queue_global_task(HTML::Task::Source::Networking, realm.global_object(), [on_complete, entry] {
|
||||
HTML::queue_global_task(HTML::Task::Source::Networking, realm.global_object(), JS::create_heap_function(realm.heap(), [on_complete, entry] {
|
||||
// FIXME: This should run other steps, for now we just assume the script loaded.
|
||||
VERIFY(entry.type == ModuleMap::EntryType::ModuleScript);
|
||||
|
||||
on_complete->function()(entry.module_script);
|
||||
});
|
||||
}));
|
||||
});
|
||||
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue