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
commit bff0e25ebe
Notes: sideshowbarker 2024-07-17 01:29:50 +09:00
14 changed files with 71 additions and 67 deletions

View file

@ -72,7 +72,7 @@ ThrowCompletionOr<NonnullGCPtr<Object>> SegmenterConstructor::construct(Function
// 9. Let localeData be %Segmenter%.[[LocaleData]].
// 10. Let r be ResolveLocale(%Segmenter%.[[AvailableLocales]], requestedLocales, opt, %Segmenter%.[[RelevantExtensionKeys]], localeData).
auto result = TRY(resolve_locale(requested_locales, opt, {}));
auto result = TRY(resolve_locale(vm, requested_locales, opt, {}));
// 11. Set segmenter.[[Locale]] to r.[[locale]].
segmenter->set_locale(move(result.locale));