Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 66267990831bf89c77fea8d45070f79c5160be55
https://github.com/WebKit/WebKit/commit/66267990831bf89c77fea8d45070f79c5160be55
Author: Yusuke Suzuki <[email protected]>
Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths:
A JSTests/stress/temporal-nan-fields.js
A JSTests/stress/temporal-plain-date-time-nan-fields.js
M Source/JavaScriptCore/runtime/TemporalCalendar.cpp
M Source/JavaScriptCore/runtime/TemporalDuration.cpp
M Source/JavaScriptCore/runtime/TemporalPlainDate.cpp
M Source/JavaScriptCore/runtime/TemporalPlainDateTime.cpp
M Source/JavaScriptCore/runtime/TemporalPlainDateTimePrototype.cpp
M Source/JavaScriptCore/runtime/TemporalPlainMonthDayPrototype.cpp
M Source/JavaScriptCore/runtime/TemporalPlainTime.cpp
Log Message:
-----------
[JSC] Temporal conversion should use toIntegerWithTruncation
https://bugs.webkit.org/show_bug.cgi?id=316369
rdar://178782245
Reviewed by Yijia Huang.
The spec requires using toIntegerWithTruncation instead of
toIntegerOrInfinity. Thus this patch replaces them all, and adding tests
for that.
Tests: JSTests/stress/temporal-nan-fields.js
JSTests/stress/temporal-plain-date-time-nan-fields.js
* JSTests/stress/temporal-nan-fields.js: Added.
(shouldThrow):
(shouldBe):
(shouldThrow.Temporal.PlainDate.from):
(shouldThrow.Temporal.PlainTime.from):
(shouldThrow.Temporal.PlainMonthDay.from):
(shouldThrow.Temporal.PlainYearMonth.from):
(shouldThrow.Temporal.ZonedDateTime.from):
* JSTests/stress/temporal-plain-date-time-nan-fields.js: Added.
(shouldThrow):
(shouldBe):
* Source/JavaScriptCore/runtime/TemporalCalendar.cpp:
(JSC::readCalendarFieldsFromObject):
(JSC::readZonedDateTimeFieldsFromObject):
* Source/JavaScriptCore/runtime/TemporalDuration.cpp:
(JSC::toRelativeTemporalObject):
* Source/JavaScriptCore/runtime/TemporalPlainDate.cpp:
(JSC::TemporalPlainDate::mergeDateFields):
(JSC::TemporalPlainDate::toDay):
(JSC::TemporalPlainDate::toYear):
(JSC::TemporalPlainDate::toYearMonth):
* Source/JavaScriptCore/runtime/TemporalPlainDateTime.cpp:
(JSC::fromImpl):
* Source/JavaScriptCore/runtime/TemporalPlainDateTimePrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/TemporalPlainMonthDayPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/TemporalPlainTime.cpp:
(JSC::TemporalPlainTime::toTemporalTimeRecord):
(JSC::TemporalPlainTime::toPartialTime):
Canonical link: https://commits.webkit.org/314635@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications