Commit 31fe9362 authored by Adam Klein's avatar Adam Klein Committed by V8 LUCI CQ

Allocate calendar before JSTemporalPlainTime to fix heap verification

Bug: v8:12978
Change-Id: Ic8c73eafbd080714915268c8bcb9f2c30614b9b2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3711712
Auto-Submit: Adam Klein <adamk@chromium.org>
Reviewed-by: 's avatarFrank Tang <ftang@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81288}
parent 4eeca86e
......@@ -686,13 +686,14 @@ MaybeHandle<JSTemporalPlainTime> CreateTemporalTime(
THROW_INVALID_RANGE(JSTemporalPlainTime);
}
Handle<JSTemporalCalendar> calendar = temporal::GetISO8601Calendar(isolate);
// 4. Let object be ? OrdinaryCreateFromConstructor(newTarget,
// "%Temporal.PlainTime.prototype%", « [[InitializedTemporalTime]],
// [[ISOHour]], [[ISOMinute]], [[ISOSecond]], [[ISOMillisecond]],
// [[ISOMicrosecond]], [[ISONanosecond]], [[Calendar]] »).
ORDINARY_CREATE_FROM_CONSTRUCTOR(object, target, new_target,
JSTemporalPlainTime)
Handle<JSTemporalCalendar> calendar = temporal::GetISO8601Calendar(isolate);
object->set_hour_minute_second(0);
object->set_second_parts(0);
// 5. Set object.[[ISOHour]] to hour.
......
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