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

LibJS: Visit GeneratorObject's previous value if it's any kind of Cell

Not just if it's an Object (which is one kind of Cell).
This commit is contained in:
Idan Horowitz 2021-09-11 19:17:38 +03:00 committed by Andreas Kling
parent b9eb8d00ca
commit 59982ef582

View file

@ -46,8 +46,7 @@ void GeneratorObject::visit_edges(Cell::Visitor& visitor)
Base::visit_edges(visitor);
visitor.visit(m_environment);
visitor.visit(m_generating_function);
if (m_previous_value.is_object())
visitor.visit(&m_previous_value.as_object());
visitor.visit(m_previous_value);
}
Value GeneratorObject::next_impl(VM& vm, GlobalObject& global_object, Optional<Value> value_to_throw)