1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 08:57:35 +00:00

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

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)