mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibJS: Convert Calendar AOs to ThrowCompletionOr
This commit is contained in:
parent
dea43d88e7
commit
f8d92232c8
22 changed files with 349 additions and 416 deletions
|
@ -80,9 +80,7 @@ Value PlainDateTimeConstructor::construct(FunctionObject& new_target)
|
|||
auto nanosecond = TRY_OR_DISCARD(to_integer_throw_on_infinity(global_object, vm.argument(8), ErrorType::TemporalInvalidPlainDateTime));
|
||||
|
||||
// 11. Let calendar be ? ToTemporalCalendarWithISODefault(calendarLike).
|
||||
auto* calendar = to_temporal_calendar_with_iso_default(global_object, vm.argument(9));
|
||||
if (vm.exception())
|
||||
return {};
|
||||
auto* calendar = TRY_OR_DISCARD(to_temporal_calendar_with_iso_default(global_object, vm.argument(9)));
|
||||
|
||||
// IMPLEMENTATION DEFINED: This is an optimization that allows us to treat these doubles as normal integers from this point onwards.
|
||||
// This does not change the exposed behavior as the call to CreateTemporalDateTime will immediately check that these values are valid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue