1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

LibJS: Change all [[RelevantExtensionKeys]] to return constexpr arrays

There's no need to allocate a vector for this internal slot. Similar to
commit: bb11437792
This commit is contained in:
Timothy Flynn 2021-11-29 19:11:49 -05:00 committed by Linus Groh
parent e27b077c2a
commit d2588d852b
9 changed files with 31 additions and 38 deletions

View file

@ -373,7 +373,7 @@ static auto& find_key_in_value(T& value, StringView key)
}
// 9.2.7 ResolveLocale ( availableLocales, requestedLocales, options, relevantExtensionKeys, localeData ), https://tc39.es/ecma402/#sec-resolvelocale
LocaleResult resolve_locale(Vector<String> const& requested_locales, LocaleOptions const& options, Vector<StringView> const& relevant_extension_keys)
LocaleResult resolve_locale(Vector<String> const& requested_locales, LocaleOptions const& options, Span<StringView const> relevant_extension_keys)
{
// 1. Let matcher be options.[[localeMatcher]].
auto const& matcher = options.locale_matcher;