mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +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
|
@ -239,7 +239,7 @@ void EnvironmentSettingsObject::notify_about_rejected_promises(Badge<EventLoop>)
|
|||
auto& global = verify_cast<DOM::EventTarget>(global_object());
|
||||
|
||||
// 5. Queue a global task on the DOM manipulation task source given global to run the following substep:
|
||||
queue_global_task(Task::Source::DOMManipulation, global, [this, &global, list = move(list)] {
|
||||
queue_global_task(Task::Source::DOMManipulation, global, JS::create_heap_function(heap(), [this, &global, list = move(list)] {
|
||||
auto& realm = global.realm();
|
||||
|
||||
// 1. For each promise p in list:
|
||||
|
@ -277,7 +277,7 @@ void EnvironmentSettingsObject::notify_about_rejected_promises(Badge<EventLoop>)
|
|||
if (not_handled)
|
||||
HTML::report_exception_to_console(promise->result(), realm, ErrorInPromise::Yes);
|
||||
}
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#concept-environment-script
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue