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

LibJS: Convert Calendar AOs to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-09-16 21:42:01 +01:00
parent dea43d88e7
commit f8d92232c8
22 changed files with 349 additions and 416 deletions

View file

@ -61,7 +61,7 @@ Value CalendarConstructor::construct(FunctionObject& new_target)
}
// 4. Return ? CreateTemporalCalendar(id, NewTarget).
return create_temporal_calendar(global_object, identifier, &new_target);
return TRY_OR_DISCARD(create_temporal_calendar(global_object, identifier, &new_target));
}
// 12.3.2 Temporal.Calendar.from ( item ), https://tc39.es/proposal-temporal/#sec-temporal.calendar.from
@ -70,7 +70,7 @@ JS_DEFINE_NATIVE_FUNCTION(CalendarConstructor::from)
auto item = vm.argument(0);
// 1. Return ? ToTemporalCalendar(item).
return to_temporal_calendar(global_object, item);
return TRY_OR_DISCARD(to_temporal_calendar(global_object, item));
}
}