mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-29 07:48:47 +00:00
1. Stop using GC::Root in member variables, since that usually creates a realm leak. 2. Stop putting OrderedHashMap<FlyString, GC::Ptr> on the stack while setting these up, since that won't protect the objects from GC.
23 lines
600 B
C++
23 lines
600 B
C++
/*
|
|
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/HTML/CustomElements/CustomElementDefinition.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
void CustomElementDefinition::visit_edges(Visitor& visitor)
|
|
{
|
|
Base::visit_edges(visitor);
|
|
visitor.visit(m_constructor);
|
|
visitor.visit(m_lifecycle_callbacks);
|
|
for (auto& entry : m_construction_stack) {
|
|
entry.visit(
|
|
[&](GC::Ref<DOM::Element>& element) { visitor.visit(element); },
|
|
[&](AlreadyConstructedCustomElementMarker&) {});
|
|
}
|
|
}
|
|
|
|
}
|