diff --git a/Libraries/LibJS/Runtime/Shape.cpp b/Libraries/LibJS/Runtime/Shape.cpp index ecac57610e..27cdba4654 100644 --- a/Libraries/LibJS/Runtime/Shape.cpp +++ b/Libraries/LibJS/Runtime/Shape.cpp @@ -148,10 +148,11 @@ void Shape::ensure_property_table() const if (m_property_table) return; m_property_table = make>(); + m_property_table->ensure_capacity(m_property_count); DeferGC defer(heap()); - Vector transition_chain; + Vector transition_chain; for (auto* shape = this; shape->m_previous; shape = shape->m_previous) { transition_chain.append(shape); }