mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibJS: Consider calls of parse_iso_date_time() fallible
See: https://github.com/tc39/proposal-temporal/pull/2027
This commit is contained in:
parent
2a7a8d2cab
commit
40ba12aa7d
Notes:
sideshowbarker
2024-07-17 19:52:38 +09:00
1 changed files with 6 additions and 3 deletions
|
@ -1242,7 +1242,8 @@ ThrowCompletionOr<TemporalInstant> parse_temporal_instant_string(GlobalObject& g
|
|||
}
|
||||
|
||||
// 3. Let result be ! ParseISODateTime(isoString).
|
||||
auto result = MUST(parse_iso_date_time(global_object, *parse_result));
|
||||
// NOTE: !/? confusion is a spec issue. See: https://github.com/tc39/proposal-temporal/pull/2027
|
||||
auto result = TRY(parse_iso_date_time(global_object, *parse_result));
|
||||
|
||||
// 4. Let timeZoneResult be ? ParseTemporalTimeZoneString(isoString).
|
||||
auto time_zone_result = TRY(parse_temporal_time_zone_string(global_object, iso_string));
|
||||
|
@ -1278,7 +1279,8 @@ ThrowCompletionOr<TemporalZonedDateTime> parse_temporal_zoned_date_time_string(G
|
|||
}
|
||||
|
||||
// 3. Let result be ! ParseISODateTime(isoString).
|
||||
auto result = MUST(parse_iso_date_time(global_object, *parse_result));
|
||||
// NOTE: !/? confusion is a spec issue. See: https://github.com/tc39/proposal-temporal/pull/2027
|
||||
auto result = TRY(parse_iso_date_time(global_object, *parse_result));
|
||||
|
||||
// 4. Let timeZoneResult be ? ParseTemporalTimeZoneString(isoString).
|
||||
auto time_zone_result = TRY(parse_temporal_time_zone_string(global_object, iso_string));
|
||||
|
@ -1560,7 +1562,8 @@ ThrowCompletionOr<TemporalZonedDateTime> parse_temporal_relative_to_string(Globa
|
|||
}
|
||||
|
||||
// 3. Let result be ! ParseISODateTime(isoString).
|
||||
auto result = MUST(parse_iso_date_time(global_object, *parse_result));
|
||||
// NOTE: !/? confusion is a spec issue. See: https://github.com/tc39/proposal-temporal/pull/2027
|
||||
auto result = TRY(parse_iso_date_time(global_object, *parse_result));
|
||||
|
||||
bool z;
|
||||
Optional<String> offset_string;
|
||||
|
|
Loading…
Add table
Reference in a new issue