1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00

LibJS: Convert NumberFormat AOs to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-09-18 19:55:56 +03:00
parent c6e23e45c5
commit 768009e005
3 changed files with 52 additions and 103 deletions

View file

@ -54,9 +54,7 @@ Value NumberFormatConstructor::construct(FunctionObject& new_target)
auto* number_format = TRY_OR_DISCARD(ordinary_create_from_constructor<NumberFormat>(global_object, new_target, &GlobalObject::intl_number_format_prototype));
// 3. Perform ? InitializeNumberFormat(numberFormat, locales, options).
initialize_number_format(global_object, *number_format, locales, options);
if (vm.exception())
return {};
TRY_OR_DISCARD(initialize_number_format(global_object, *number_format, locales, options));
// 4. If the implementation supports the normative optional constructor mode of 4.3 Note 1, then
// a. Let this be the this value.