LibWeb: Use correct type for MessageEventInit.ports

This didn't work previously because the IDL generator used the
incorrect type for some types of sequences within dictionaries.
This commit is contained in:
Tim Ledbetter 2024-05-15 20:58:02 +01:00 committed by Andreas Kling
commit 63246577d2
Notes: sideshowbarker 2024-07-17 04:57:23 +09:00
6 changed files with 10 additions and 10 deletions

View file

@ -8,6 +8,7 @@
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/Bindings/MessageEventPrototype.h>
#include <LibWeb/HTML/MessageEvent.h>
#include <LibWeb/HTML/MessagePort.h>
namespace Web::HTML {
@ -31,9 +32,9 @@ MessageEvent::MessageEvent(JS::Realm& realm, FlyString const& event_name, Messag
, m_source(event_init.source)
{
m_ports.ensure_capacity(event_init.ports.size());
for (auto& port : event_init.ports) {
for (auto const& port : event_init.ports) {
VERIFY(port);
m_ports.unchecked_append(*port);
m_ports.unchecked_append(static_cast<JS::Object&>(*port));
}
}