LibJS: GlobalObject needs to mark the iterator prototypes

Otherwise they all disappear in the first garbage collection.
This commit is contained in:
Andreas Kling 2020-09-08 15:37:39 +02:00
parent b32c0c8181
commit 3143fea1eb
Notes: sideshowbarker 2024-07-19 02:49:42 +09:00

View file

@ -143,6 +143,11 @@ void GlobalObject::visit_children(Visitor& visitor)
visitor.visit(m_##snake_name##_constructor);
JS_ENUMERATE_ERROR_SUBCLASSES
#undef __JS_ENUMERATE
#define __JS_ENUMERATE(ClassName, snake_name) \
visitor.visit(m_##snake_name##_prototype);
JS_ENUMERATE_ITERATOR_PROTOTYPES
#undef __JS_ENUMERATE
}
JS_DEFINE_NATIVE_FUNCTION(GlobalObject::gc)