mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
LibWeb: Do not store message port objects in a plain vector
This commit is contained in:
parent
c479ca97b6
commit
cd2a34deb7
Notes:
github-actions[bot]
2024-10-31 23:37:10 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/cd2a34deb7f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2088
1 changed files with 3 additions and 3 deletions
|
@ -66,10 +66,10 @@ Variant<JS::Handle<WindowProxy>, JS::Handle<MessagePort>, Empty> MessageEvent::s
|
|||
JS::NonnullGCPtr<JS::Object> MessageEvent::ports() const
|
||||
{
|
||||
if (!m_ports_array) {
|
||||
Vector<JS::Value> port_vector;
|
||||
for (auto const& port : m_ports) {
|
||||
JS::MarkedVector<JS::Value> port_vector(heap());
|
||||
for (auto const& port : m_ports)
|
||||
port_vector.append(port);
|
||||
}
|
||||
|
||||
m_ports_array = JS::Array::create_from(realm(), port_vector);
|
||||
MUST(m_ports_array->set_integrity_level(IntegrityLevel::Frozen));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue