LibJS+LibWeb: Use new Cell::Visitor helpers to avoid manual iteration

This commit is contained in:
Andreas Kling 2024-04-15 13:58:21 +02:00
parent 1a6d025793
commit 53d0dd4a2e
Notes: sideshowbarker 2024-07-17 20:58:35 +09:00
63 changed files with 98 additions and 213 deletions

View file

@ -39,10 +39,8 @@ void CustomElementRegistry::initialize(JS::Realm& realm)
void CustomElementRegistry::visit_edges(Visitor& visitor)
{
Base::visit_edges(visitor);
for (auto& definition : m_custom_element_definitions)
visitor.visit(definition);
for (auto& [name, promise] : m_when_defined_promise_map)
visitor.visit(promise);
visitor.visit(m_custom_element_definitions);
visitor.visit(m_when_defined_promise_map);
}
// https://webidl.spec.whatwg.org/#es-callback-function