From 60ee542612e90f2a78e952c04d9ba0743b657b70 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sat, 23 Oct 2021 01:05:50 +0100 Subject: [PATCH] LibJS: Mark GetEpochFromISOParts as infallible This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/66ea81b --- Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp index 0969ee721c..2484feac11 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp @@ -115,10 +115,8 @@ ThrowCompletionOr 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) {