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
commit b3694653a7
Notes: sideshowbarker 2024-07-16 22:26:05 +09:00
16 changed files with 153 additions and 164 deletions

View file

@ -38,8 +38,8 @@ struct ResolvedPlurality {
::Locale::PluralOperands get_operands(StringView string);
::Locale::PluralCategory plural_rule_select(StringView locale, ::Locale::PluralForm type, Value number, ::Locale::PluralOperands operands);
ThrowCompletionOr<ResolvedPlurality> resolve_plural(VM&, PluralRules const&, Value number);
ThrowCompletionOr<ResolvedPlurality> resolve_plural(VM&, NumberFormatBase const& number_format, ::Locale::PluralForm type, Value number);
ResolvedPlurality resolve_plural(PluralRules const&, Value number);
ResolvedPlurality resolve_plural(NumberFormatBase const& number_format, ::Locale::PluralForm type, Value number);
::Locale::PluralCategory plural_rule_select_range(StringView locale, ::Locale::PluralForm, ::Locale::PluralCategory start, ::Locale::PluralCategory end);
ThrowCompletionOr<::Locale::PluralCategory> resolve_plural_range(VM&, PluralRules const&, Value start, Value end);