summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/RegExpStringIterator.h
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-07-16 14:36:52 -0400
committerAndreas Kling <kling@serenityos.org>2021-07-16 20:44:48 +0200
commit860417fb4fb9917fd08a6df2d70ab5c22935cfa8 (patch)
treea05a470c71c804c92b72d765cecf7d90c5d75d64 /Userland/Libraries/LibJS/Runtime/RegExpStringIterator.h
parent1b8f73b6b3afd8d78172fcd30b95db67f259f58a (diff)
downloadserenity-860417fb4fb9917fd08a6df2d70ab5c22935cfa8.zip
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.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/RegExpStringIterator.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpStringIterator.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpStringIterator.h b/Userland/Libraries/LibJS/Runtime/RegExpStringIterator.h
index 876dd796a9..fec3bd44e3 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpStringIterator.h
+++ b/Userland/Libraries/LibJS/Runtime/RegExpStringIterator.h
@@ -28,6 +28,8 @@ public:
void set_done() { m_done = true; }
private:
+ virtual void visit_edges(Cell::Visitor&) override;
+
Object& m_regexp_object;
String m_string;
bool m_global { false };