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

LibJS: Stop propagating small OOM errors from Intl.NumberFormat

Note this also does the same for Intl.PluralRules. The only OOM errors
propagated from Intl.PluralRules were from Intl.NumberFormat.
This commit is contained in:
Timothy Flynn 2023-08-30 12:30:39 -04:00 committed by Andreas Kling
parent 30a812b77b
commit b3694653a7
16 changed files with 153 additions and 164 deletions

View file

@ -44,7 +44,7 @@ ThrowCompletionOr<Value> NumberFormatFunction::call()
auto mathematical_value = TRY(to_intl_mathematical_value(vm, value));
// 5. Return ? FormatNumeric(nf, x).
auto formatted = TRY(format_numeric(vm, m_number_format, move(mathematical_value)));
auto formatted = format_numeric(vm, m_number_format, move(mathematical_value));
return PrimitiveString::create(vm, move(formatted));
}