mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibJS: Convert canonicalize_locale_list() to ThrowCompletionOr
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 03:42:50 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/3758e652937 Pull-request: https://github.com/SerenityOS/serenity/pull/10121 Reviewed-by: https://github.com/linusg ✅
@@ -75,7 +75,7 @@ JS_DEFINE_NATIVE_FUNCTION(NumberFormatConstructor::supported_locales_of)
|
||||
// 1. Let availableLocales be %NumberFormat%.[[AvailableLocales]].
|
||||
|
||||
// 2. Let requestedLocales be ? CanonicalizeLocaleList(locales).
|
||||
auto requested_locales = canonicalize_locale_list(global_object, locales);
|
||||
auto requested_locales = TRY_OR_DISCARD(canonicalize_locale_list(global_object, locales));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user