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: Frank Tang <ftang@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#81288}
This commit is contained in:
parent
4eeca86e3c
commit
31fe9362b4
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user