mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
LibJS: Pass time zone strings around as String more regularly
These are String from the outset, so this patch is almost entirely just changing function parameter types. This will allow us to cache time zone parse results without invoking any extra allocations.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
d065f6bf00
commit
f9fa548d43
Notes:
github-actions[bot]
2026-02-19 08:21:38 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/f9fa548d43c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8019 Reviewed-by: https://github.com/gmta ✅
@@ -1595,7 +1595,7 @@ ThrowCompletionOr<ParsedTimeZoneIdentifier> parse_temporal_time_zone_string(VM&
|
||||
|
||||
// 6. If timeZoneResult.[[Z]] is true, return ! ParseTimeZoneIdentifier("UTC").
|
||||
if (time_zone_result.z_designator)
|
||||
return MUST(parse_time_zone_identifier(vm, "UTC"sv));
|
||||
return MUST(parse_time_zone_identifier(vm, 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