mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00: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: cd2a34deb7
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
|
JS::NonnullGCPtr<JS::Object> MessageEvent::ports() const
|
||||||
{
|
{
|
||||||
if (!m_ports_array) {
|
if (!m_ports_array) {
|
||||||
Vector<JS::Value> port_vector;
|
JS::MarkedVector<JS::Value> port_vector(heap());
|
||||||
for (auto const& port : m_ports) {
|
for (auto const& port : m_ports)
|
||||||
port_vector.append(port);
|
port_vector.append(port);
|
||||||
}
|
|
||||||
m_ports_array = JS::Array::create_from(realm(), port_vector);
|
m_ports_array = JS::Array::create_from(realm(), port_vector);
|
||||||
MUST(m_ports_array->set_integrity_level(IntegrityLevel::Frozen));
|
MUST(m_ports_array->set_integrity_level(IntegrityLevel::Frozen));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue