Skip to content

Commit d46be7e

Browse files
davidotawesomekling
authored andcommitted
LibJS: Visit internal values in PromiseValueList
1 parent 212c8da commit d46be7e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313

1414
namespace JS {
1515

16+
void PromiseValueList::visit_edges(Visitor& visitor)
17+
{
18+
Cell::visit_edges(visitor);
19+
for (auto& val : m_values)
20+
visitor.visit(val);
21+
}
22+
1623
PromiseResolvingElementFunction::PromiseResolvingElementFunction(size_t index, PromiseValueList& values, PromiseCapability capability, RemainingElements& remaining_elements, Object& prototype)
1724
: NativeFunction(prototype)
1825
, m_index(index)

Userland/Libraries/LibJS/Runtime/PromiseResolvingElementFunctions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class PromiseValueList final : public Cell {
3535

3636
private:
3737
virtual const char* class_name() const override { return "PromiseValueList"; }
38+
virtual void visit_edges(Visitor&) override;
3839

3940
Vector<Value> m_values;
4041
};

0 commit comments

Comments
 (0)