mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +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 ✅
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2023, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
|
||||
* Copyright (c) 2024-2025, Tim Flynn <trflynn89@ladybird.org>
|
||||
* Copyright (c) 2024-2026, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@@ -69,7 +69,7 @@ ThrowCompletionOr<GC::Ref<Object>> ZonedDateTimeConstructor::construct(FunctionO
|
||||
return vm.throw_completion<TypeError>(ErrorType::NotAString, time_zone_value);
|
||||
|
||||
// 5. Let timeZoneParse be ? ParseTimeZoneIdentifier(timeZone).
|
||||
auto time_zone_parse = TRY(parse_time_zone_identifier(vm, time_zone_value.as_string().utf8_string_view()));
|
||||
auto time_zone_parse = TRY(parse_time_zone_identifier(vm, time_zone_value.as_string().utf8_string()));
|
||||
|
||||
String time_zone;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user