1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

LibJS: Skip redundant marking of Shape property table keys

All the keys in a property table are guaranteed to be marked via
Shape::m_property_key in each step of the transition chain that leads
up to the Shape.
This commit is contained in:
Andreas Kling 2023-12-11 16:50:04 +01:00
parent 3d92c26445
commit 8eacb81eba

View file

@ -135,10 +135,10 @@ void Shape::visit_edges(Cell::Visitor& visitor)
visitor.visit(m_prototype);
visitor.visit(m_previous);
m_property_key.visit_edges(visitor);
if (m_property_table) {
for (auto& it : *m_property_table)
it.key.visit_edges(visitor);
}
// NOTE: We don't need to mark the keys in the property table, since they are guaranteed
// to also be marked by the chain of shapes leading up to this one.
visitor.ignore(m_prototype_transitions);
// FIXME: The forward transition keys should be weak, but we have to mark them for now in case they go stale.