diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-07-16 14:36:52 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-16 20:44:48 +0200 |
commit | 860417fb4fb9917fd08a6df2d70ab5c22935cfa8 (patch) | |
tree | a05a470c71c804c92b72d765cecf7d90c5d75d64 /Userland/Libraries/LibJS/Runtime/RegExpStringIterator.h | |
parent | 1b8f73b6b3afd8d78172fcd30b95db67f259f58a (diff) | |
download | serenity-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.h | 2 |
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 }; |