LibJS: Object needs to protect values in its storage

Otherwise the garbage collector will eat them way too soon! This made
it impossible to use "js -g" without crashing.
This commit is contained in:
Andreas Kling 2020-04-06 12:33:27 +02:00
parent bb1ad4b649
commit 67f7763ab9
Notes: sideshowbarker 2024-07-19 07:51:36 +09:00

View file

@ -171,6 +171,9 @@ void Object::visit_children(Cell::Visitor& visitor)
{
Cell::visit_children(visitor);
visitor.visit(m_shape);
for (auto& value : m_storage)
visitor.visit(value);
}
bool Object::has_own_property(const FlyString& property_name) const