mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibJS: Use infallible time zone parser in a couple more locations
This commit is contained in:
committed by
Jelle Raaijmakers
parent
f9fa548d43
commit
6e433f0d10
Notes:
github-actions[bot]
2026-02-19 08:21:31 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/6e433f0d104 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8019 Reviewed-by: https://github.com/gmta ✅
@@ -1591,11 +1591,11 @@ ThrowCompletionOr<ParsedTimeZoneIdentifier> parse_temporal_time_zone_string(VM&
|
||||
|
||||
// 5. If timeZoneResult.[[TimeZoneAnnotation]] is not EMPTY, return ! ParseTimeZoneIdentifier(timeZoneResult.[[TimeZoneAnnotation]]).
|
||||
if (time_zone_result.time_zone_annotation.has_value())
|
||||
return MUST(parse_time_zone_identifier(vm, *time_zone_result.time_zone_annotation));
|
||||
return parse_time_zone_identifier(*time_zone_result.time_zone_annotation);
|
||||
|
||||
// 6. If timeZoneResult.[[Z]] is true, return ! ParseTimeZoneIdentifier("UTC").
|
||||
if (time_zone_result.z_designator)
|
||||
return MUST(parse_time_zone_identifier(vm, UTC_TIME_ZONE));
|
||||
return parse_time_zone_identifier(UTC_TIME_ZONE);
|
||||
|
||||
// 7. If timeZoneResult.[[OffsetString]] is not EMPTY, return ? ParseTimeZoneIdentifier(timeZoneResult.[[OffsetString]]).
|
||||
if (time_zone_result.offset_string.has_value())
|
||||
|
||||
Reference in New Issue
Block a user