mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
AK: Make "foo"_fly_string infallible
Stop worrying about tiny OOMs. Work towards #20405.
This commit is contained in:
parent
34344120f2
commit
25eee91811
30 changed files with 59 additions and 72 deletions
|
@ -12,18 +12,17 @@ namespace Web::HTML::CustomElementReactionNames {
|
|||
ENUMERATE_CUSTOM_ELEMENT_REACTION_NAMES
|
||||
#undef __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME
|
||||
|
||||
ErrorOr<void> initialize_strings()
|
||||
void initialize_strings()
|
||||
{
|
||||
static bool s_initialized = false;
|
||||
VERIFY(!s_initialized);
|
||||
|
||||
#define __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME(name) \
|
||||
name = TRY(#name##_fly_string);
|
||||
name = #name##_fly_string;
|
||||
ENUMERATE_CUSTOM_ELEMENT_REACTION_NAMES
|
||||
#undef __ENUMERATE_CUSTOM_ELEMENT_REACTION_NAME
|
||||
|
||||
s_initialized = true;
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue