mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 08:48:49 +00:00
LibWeb: Remove now-unnecessary JS::Handles in HTML task capture lists
JS::SafeFunction will protect anything captures for HTML tasks now.
This commit is contained in:
parent
d505192014
commit
2ccb9bef49
Notes:
sideshowbarker
2024-07-17 06:41:12 +09:00
Author: https://github.com/awesomekling
Commit: 2ccb9bef49
6 changed files with 22 additions and 22 deletions
|
@ -195,7 +195,7 @@ void EnvironmentSettingsObject::notify_about_rejected_promises(Badge<EventLoop>)
|
|||
auto& global = 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 = JS::make_handle(&global), list = move(list)]() mutable {
|
||||
queue_global_task(Task::Source::DOMManipulation, global, [this, &global, list = move(list)]() mutable {
|
||||
// 1. For each promise p in list:
|
||||
for (auto promise_handle : list) {
|
||||
auto& promise = *promise_handle.cell();
|
||||
|
@ -217,7 +217,7 @@ void EnvironmentSettingsObject::notify_about_rejected_promises(Badge<EventLoop>)
|
|||
/* .reason = */ promise.result(),
|
||||
};
|
||||
// FIXME: This currently assumes that global is a WindowObject.
|
||||
auto& window = verify_cast<HTML::Window>(*global.cell());
|
||||
auto& window = verify_cast<HTML::Window>(global);
|
||||
|
||||
auto promise_rejection_event = PromiseRejectionEvent::create(window, HTML::EventNames::unhandledrejection, event_init);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue