LibJS: Visit internal values in PromiseValueList

This commit is contained in:
davidot 2022-02-04 16:22:47 +01:00 committed by Andreas Kling
parent 212c8dad5e
commit d46be7e7f2
Notes: sideshowbarker 2024-07-17 19:46:52 +09:00
2 changed files with 8 additions and 0 deletions

View file

@ -13,6 +13,13 @@
namespace JS {
void PromiseValueList::visit_edges(Visitor& visitor)
{
Cell::visit_edges(visitor);
for (auto& val : m_values)
visitor.visit(val);
}
PromiseResolvingElementFunction::PromiseResolvingElementFunction(size_t index, PromiseValueList& values, PromiseCapability capability, RemainingElements& remaining_elements, Object& prototype)
: NativeFunction(prototype)
, m_index(index)

View file

@ -35,6 +35,7 @@ public:
private:
virtual const char* class_name() const override { return "PromiseValueList"; }
virtual void visit_edges(Visitor&) override;
Vector<Value> m_values;
};