mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-01 22:29:13 +00:00
LibWeb: Visit custom element's lifecycle callbacks
...instead of using JS::Handle which causes leaks when object holding the callback can be reached by visiting the callback's dependencies.
This commit is contained in:
committed by
Alexander Kalenik
parent
3d48c55e50
commit
3b4230e0b0
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* 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);
|
||||
for (auto& callback : m_lifecycle_callbacks)
|
||||
visitor.visit(callback.value);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user