mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:47:43 +00:00
LibJS: GlobalObject needs to mark the iterator prototypes
Otherwise they all disappear in the first garbage collection.
This commit is contained in:
parent
b32c0c8181
commit
3143fea1eb
1 changed files with 5 additions and 0 deletions
|
@ -143,6 +143,11 @@ void GlobalObject::visit_children(Visitor& visitor)
|
||||||
visitor.visit(m_##snake_name##_constructor);
|
visitor.visit(m_##snake_name##_constructor);
|
||||||
JS_ENUMERATE_ERROR_SUBCLASSES
|
JS_ENUMERATE_ERROR_SUBCLASSES
|
||||||
#undef __JS_ENUMERATE
|
#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)
|
JS_DEFINE_NATIVE_FUNCTION(GlobalObject::gc)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue