1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

LibJS: Propagate OOM errors from Intl Abstract Operations

This excludes the PartitionPattern AO as that has a much larger foot-
print and will be handled separately.
This commit is contained in:
Timothy Flynn 2023-01-19 11:39:05 -05:00 committed by Linus Groh
parent ca62aeb6bd
commit bff0e25ebe
14 changed files with 71 additions and 67 deletions

View file

@ -76,7 +76,7 @@ ThrowCompletionOr<NonnullGCPtr<Object>> DisplayNamesConstructor::construct(Funct
opt.locale_matcher = matcher;
// 10. Let r be ResolveLocale(%DisplayNames%.[[AvailableLocales]], requestedLocales, opt, %DisplayNames%.[[RelevantExtensionKeys]]).
auto result = TRY(resolve_locale(requested_locales, opt, {}));
auto result = TRY(resolve_locale(vm, requested_locales, opt, {}));
// 11. Let style be ? GetOption(options, "style", string, « "narrow", "short", "long" », "long").
auto style = TRY(get_option(vm, *options, vm.names.style, OptionType::String, { "narrow"sv, "short"sv, "long"sv }, "long"sv));