diff --git a/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp b/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp index 822f788e50b..ec58b565321 100644 --- a/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp +++ b/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp @@ -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) diff --git a/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.h b/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.h index ca9dbc42f10..cddac8f192f 100644 --- a/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.h +++ b/Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.h @@ -35,6 +35,7 @@ public: private: virtual const char* class_name() const override { return "PromiseValueList"; } + virtual void visit_edges(Visitor&) override; Vector m_values; };