mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02: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
Notes:
sideshowbarker
2024-07-18 03:20:18 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/3b4230e0b0 Pull-request: https://github.com/SerenityOS/serenity/pull/23553
@@ -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