mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 14:05:15 +00:00
Required for the PerformanceMark constructor, which doesn't allow any mark names that have the same name as an attribute in the PerformanceTiming interface in a Window context.
29 lines
702 B
C++
29 lines
702 B
C++
/*
|
|
* Copyright (c) 2023, Luke Wilde <lukew@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/NavigationTiming/EntryNames.h>
|
|
|
|
namespace Web::NavigationTiming::EntryNames {
|
|
|
|
#define __ENUMERATE_NAVIGATION_TIMING_ENTRY_NAME(name) FlyString name;
|
|
ENUMERATE_NAVIGATION_TIMING_ENTRY_NAMES
|
|
#undef __ENUMERATE_NAVIGATION_TIMING_ENTRY_NAME
|
|
|
|
ErrorOr<void> initialize_strings()
|
|
{
|
|
static bool s_initialized = false;
|
|
VERIFY(!s_initialized);
|
|
|
|
#define __ENUMERATE_NAVIGATION_TIMING_ENTRY_NAME(name) \
|
|
name = TRY(#name##_fly_string);
|
|
ENUMERATE_NAVIGATION_TIMING_ENTRY_NAMES
|
|
#undef __ENUMERATE_NAVIGATION_TIMING_ENTRY_NAME
|
|
|
|
s_initialized = true;
|
|
return {};
|
|
}
|
|
|
|
}
|