mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
LibJS: Mark GetEpochFromISOParts as infallible
This is an editorial change in the Temporal spec.
See: 66ea81b
This commit is contained in:
parent
0f5cfe975f
commit
60ee542612
1 changed files with 1 additions and 3 deletions
|
@ -115,10 +115,8 @@ ThrowCompletionOr<BigInt*> parse_temporal_instant(GlobalObject& global_object, S
|
|||
// 4. Assert: offsetString is not undefined.
|
||||
VERIFY(offset_string.has_value());
|
||||
|
||||
// 5. Let utc be ? GetEpochFromISOParts(result.[[Year]], result.[[Month]], result.[[Day]], result.[[Hour]], result.[[Minute]], result.[[Second]], result.[[Millisecond]], result.[[Microsecond]], result.[[Nanosecond]]).
|
||||
// 5. Let utc be ! GetEpochFromISOParts(result.[[Year]], result.[[Month]], result.[[Day]], result.[[Hour]], result.[[Minute]], result.[[Second]], result.[[Millisecond]], result.[[Microsecond]], result.[[Nanosecond]]).
|
||||
auto* utc = get_epoch_from_iso_parts(global_object, result.year, result.month, result.day, result.hour, result.minute, result.second, result.millisecond, result.microsecond, result.nanosecond);
|
||||
if (auto* exception = vm.exception())
|
||||
return throw_completion(exception->value());
|
||||
|
||||
// 6. If utc < −8.64 × 10^21 or utc > 8.64 × 10^21, then
|
||||
if (utc->big_integer() < INSTANT_NANOSECONDS_MIN || utc->big_integer() > INSTANT_NANOSECONDS_MAX) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue