1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:37:34 +00:00

LibJS: Convert TimeZone AOs to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-09-16 01:49:19 +03:00 committed by Linus Groh
parent 830d484d78
commit cc00a726a8
12 changed files with 99 additions and 195 deletions

View file

@ -60,9 +60,7 @@ Value ZonedDateTimeConstructor::construct(FunctionObject& new_target)
}
// 4. Let timeZone be ? ToTemporalTimeZone(timeZoneLike).
auto* time_zone = to_temporal_time_zone(global_object, vm.argument(1));
if (vm.exception())
return {};
auto* time_zone = TRY_OR_DISCARD(to_temporal_time_zone(global_object, vm.argument(1)));
// 5. Let calendar be ? ToTemporalCalendarWithISODefault(calendarLike).
auto* calendar = to_temporal_calendar_with_iso_default(global_object, vm.argument(2));