summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Set.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Set.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Set.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Set.cpp b/Userland/Libraries/LibJS/Runtime/Set.cpp
index dfaaf0b28a..32a11c0148 100644
--- a/Userland/Libraries/LibJS/Runtime/Set.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Set.cpp
@@ -15,6 +15,7 @@ Set* Set::create(GlobalObject& global_object)
Set::Set(Object& prototype)
: Object(prototype)
+ , m_values(*prototype.global_object().map_prototype())
{
}
@@ -25,8 +26,7 @@ Set::~Set()
void Set::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
- for (auto& value : m_values)
- visitor.visit(value);
+ static_cast<Object&>(m_values).visit_edges(visitor);
}
}