1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibJS: Ensure RegExpStringIterator keeps the RegExp matcher object alive

Fixes a crash found with 'test-js -g' due to this object going out of
scope.
This commit is contained in:
Timothy Flynn 2021-07-16 14:36:52 -04:00 committed by Andreas Kling
parent 1b8f73b6b3
commit 860417fb4f
2 changed files with 8 additions and 0 deletions

View file

@ -24,4 +24,10 @@ RegExpStringIterator::RegExpStringIterator(Object& prototype, Object& regexp_obj
{
}
void RegExpStringIterator::visit_edges(Cell::Visitor& visitor)
{
Object::visit_edges(visitor);
visitor.visit(&m_regexp_object);
}
}