Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b7d86046792af67a49c7f8f2a8c94af0270b759a
https://github.com/WebKit/WebKit/commit/b7d86046792af67a49c7f8f2a8c94af0270b759a
Author: Yijia Huang <[email protected]>
Date: 2026-07-17 (Fri, 17 Jul 2026)
Changed paths:
M JSTests/stress/temporal-plain-month-day.js
M Source/JavaScriptCore/runtime/temporal/core/CalendarFields.cpp
M Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.cpp
M Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.h
Log Message:
-----------
[JSC][Temporal] Fix PMD reference-year drop for Chinese leap months
https://bugs.webkit.org/show_bug.cgi?id=319656
rdar://182481524
Reviewed by Yusuke Suzuki.
PlainMonthDay.from({calendar:"chinese", year:1651, monthCode:"M01L",
day:29}) returned 1651-02-19[u-ca=chinese] instead of the canonical
1972-02-14 required by CalendarMonthDayToISOReferenceDate. The
second-pass re-resolve in monthDayFromFields propagated
ecmaReferenceYear's INT32_MIN UseRegularIfConstrain sentinel as if it
were a real year, calendarDateFromFields failed, and the fallback
returned the first-pass result — silently dropping canonicalization.
Root cause: ecmaReferenceYear's sentinel-in-int32_t API. Change it
to Expected<int32_t, EcmaReferenceYearError>, matching icu4x's
Result<i32, EcmaReferenceYearError>. Silent misuse now fails to
compile. While migrating, align every calendar's table with icu4x
line-for-line — Chinese/Dangi/Islamic/Hebrew reject out-of-range
monthNumber; Coptic/Ethiopic/Ethioaa/Persian/Indian reject any leap
monthCode.
Canonical link: https://commits.webkit.org/317415@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications