ladybird/Libraries/LibWeb/HTML/CustomElements/CustomElementReactionNames.h
Andreas Kling 164ed80244 Meta: Enable exit-time destructor warnings for libraries
Enable -Wexit-time-destructors for all in-tree library targets and
update process-lifetime library statics so they no longer register
exit-time destructors. Long-lived caches, lookup tables, singleton
registries, and generated constants now use NeverDestroyed or leaked
references where the data is intended to live until process exit.

Update LibWeb, LibLine, and the binding generators so regenerated
sources follow the same rule instead of reintroducing destructed
statics.
2026-06-04 19:20:49 +02:00

29 lines
1.2 KiB
C++

/*
* Copyright (c) 2023, Luke Wilde <lukew@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/FlyString.h>
namespace Web::HTML::CustomElementReactionNames {
// https://html.spec.whatwg.org/multipage/custom-elements.html#concept-custom-element-definition-lifecycle-callbacks
#define ENUMERATE_CUSTOM_ELEMENT_REACTION_NAMES \
__ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(connectedCallback) \
__ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(disconnectedCallback) \
__ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(adoptedCallback) \
__ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(connectedMoveCallback) \
__ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(attributeChangedCallback) \
__ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(formAssociatedCallback) \
__ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(formDisabledCallback) \
__ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(formResetCallback) \
__ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(formStateRestoreCallback)
#define __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(name) extern FlyString const& name;
ENUMERATE_CUSTOM_ELEMENT_REACTION_NAMES
#undef __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME
}