LibJS: Mark heap cell values stored in Set instances

This makes sure they dont get garbage collected while stored in a Set.
This commit is contained in:
Idan Horowitz 2021-06-09 18:01:06 +03:00 committed by Linus Groh
commit ad0e3c0e54
Notes: sideshowbarker 2024-07-18 12:33:28 +09:00
2 changed files with 9 additions and 0 deletions

View file

@ -47,6 +47,8 @@ public:
HashTable<Value, ValueTraits>& values() { return m_values; };
private:
virtual void visit_edges(Visitor& visitor) override;
HashTable<Value, ValueTraits> m_values; // FIXME: Replace with a HashTable that maintains a linked list of insertion order for correct iteration order
};