mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +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 ✅
@@ -357,9 +357,7 @@ NumberFormat* initialize_number_format(GlobalObject& global_object, NumberFormat
|
||||
auto& vm = global_object.vm();
|
||||
|
||||
// 1. Let requestedLocales be ? CanonicalizeLocaleList(locales).
|
||||
auto requested_locales = canonicalize_locale_list(global_object, locales_value);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto requested_locales = TRY_OR_DISCARD(canonicalize_locale_list(global_object, locales_value));
|
||||
|
||||
// 2. Set options to ? CoerceOptionsToObject(options).
|
||||
auto* options = coerce_options_to_object(global_object, options_value);
|
||||
|
||||
Reference in New Issue
Block a user