mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +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:
parent
1b8f73b6b3
commit
860417fb4f
Notes:
sideshowbarker
2024-07-18 08:55:09 +09:00
Author: https://github.com/trflynn89
Commit: 860417fb4f
Pull-request: https://github.com/SerenityOS/serenity/pull/8810
Reviewed-by: https://github.com/linusg
2 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue