Commit c9ebb118 authored by Frank Tang's avatar Frank Tang Committed by V8 LUCI CQ

[Temporal] Fix GCC >= comparison error by cl/3624980.

Change kUTCTimeZoneIndex to int32_t from uint32_t
And compare index against 0.

Bug: v8:11544
Change-Id: Ib7dd55cab796d1d9a4b0e2869b098520265a04f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3632678
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80412}
parent 1d25122a
......@@ -1018,7 +1018,7 @@ MaybeHandle<JSTemporalTimeZone> CreateTemporalTimeZone(
}
#ifdef V8_INTL_SUPPORT
int32_t time_zone_index = Intl::GetTimeZoneIndex(isolate, identifier);
if (time_zone_index >= JSTemporalTimeZone::kUTCTimeZoneIndex) {
if (time_zone_index >= 0) {
return CreateTemporalTimeZoneFromIndex(isolate, target, new_target,
time_zone_index);
}
......
......@@ -445,7 +445,7 @@ class JSTemporalTimeZone
DECLARE_TEMPORAL_INLINE_GETTER_SETTER(offset_sub_milliseconds)
int32_t time_zone_index() const;
static constexpr uint32_t kUTCTimeZoneIndex = 0;
static constexpr int32_t kUTCTimeZoneIndex = 0;
int64_t offset_nanoseconds() const;
void set_offset_nanoseconds(int64_t offset_nanoseconds);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment