mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:45:06 +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
6 changed files with 22 additions and 22 deletions
|
@ -87,11 +87,11 @@ void MessagePort::post_message(JS::Value message)
|
|||
|
||||
// FIXME: This is an ad-hoc hack implementation instead, since we don't currently
|
||||
// have serialization and deserialization of messages.
|
||||
main_thread_event_loop().task_queue().add(HTML::Task::create(HTML::Task::Source::PostedMessage, nullptr, [strong_port = JS::make_handle(*target_port), strong_message = JS::make_handle(message)]() mutable {
|
||||
main_thread_event_loop().task_queue().add(HTML::Task::create(HTML::Task::Source::PostedMessage, nullptr, [target_port, message]() mutable {
|
||||
MessageEventInit event_init {};
|
||||
event_init.data = strong_message.value();
|
||||
event_init.data = message;
|
||||
event_init.origin = "<origin>";
|
||||
strong_port->dispatch_event(*MessageEvent::create(verify_cast<HTML::Window>(strong_port->realm().global_object()), HTML::EventNames::message, event_init));
|
||||
target_port->dispatch_event(*MessageEvent::create(verify_cast<HTML::Window>(target_port->realm().global_object()), HTML::EventNames::message, event_init));
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue