1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 23:37:35 +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:
Aliaksandr Kalenik 2024-03-11 19:12:52 +01:00 committed by Alexander Kalenik
parent 3d48c55e50
commit 3b4230e0b0
5 changed files with 26 additions and 5 deletions

View file

@ -1910,7 +1910,7 @@ void Element::enqueue_a_custom_element_callback_reaction(FlyString const& callba
if (callback_iterator == definition->lifecycle_callbacks().end())
return;
if (callback_iterator->value.is_null())
if (!callback_iterator->value)
return;
// 4. If callbackName is "attributeChangedCallback", then: