1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:47:35 +00:00

LibJS: Propagate OOM errors from all Intl.Locale *OfLocale AOs

This commit is contained in:
Timothy Flynn 2023-01-21 22:45:02 -05:00 committed by Tim Flynn
parent f2527c8c81
commit 4548906e7b
3 changed files with 34 additions and 33 deletions

View file

@ -10,6 +10,7 @@
#include <AK/Optional.h>
#include <AK/String.h>
#include <AK/Vector.h>
#include <LibJS/Heap/GCPtr.h>
#include <LibJS/Runtime/Completion.h>
#include <LibJS/Runtime/Object.h>
#include <LibJS/Runtime/Value.h>
@ -81,12 +82,12 @@ struct WeekInfo {
Vector<u8> weekend; // [[Weekend]]
};
Array* calendars_of_locale(VM&, Locale const&);
Array* collations_of_locale(VM&, Locale const& locale);
Array* hour_cycles_of_locale(VM&, Locale const& locale);
Array* numbering_systems_of_locale(VM&, Locale const&);
Array* time_zones_of_locale(VM&, StringView region);
StringView character_direction_of_locale(Locale const&);
WeekInfo week_info_of_locale(Locale const&);
ThrowCompletionOr<NonnullGCPtr<Array>> calendars_of_locale(VM&, Locale const&);
ThrowCompletionOr<NonnullGCPtr<Array>> collations_of_locale(VM&, Locale const& locale);
ThrowCompletionOr<NonnullGCPtr<Array>> hour_cycles_of_locale(VM&, Locale const& locale);
ThrowCompletionOr<NonnullGCPtr<Array>> numbering_systems_of_locale(VM&, Locale const&);
ThrowCompletionOr<NonnullGCPtr<Array>> time_zones_of_locale(VM&, StringView region);
ThrowCompletionOr<StringView> character_direction_of_locale(VM&, Locale const&);
ThrowCompletionOr<WeekInfo> week_info_of_locale(VM&, Locale const&);
}