Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 642d9211add2a4e20dbe7be9a2012d0de1916b2c
https://github.com/WebKit/WebKit/commit/642d9211add2a4e20dbe7be9a2012d0de1916b2c
Author: Yijia Huang <[email protected]>
Date: 2026-08-10 (Mon, 10 Aug 2026)
Changed paths:
M Source/JavaScriptCore/runtime/TemporalCalendar.cpp
M Source/JavaScriptCore/runtime/TemporalCalendar.h
M Source/JavaScriptCore/runtime/TemporalPlainDate.cpp
M Source/JavaScriptCore/runtime/TemporalPlainDatePrototype.cpp
M Source/JavaScriptCore/runtime/TemporalPlainDateTimePrototype.cpp
M Source/JavaScriptCore/runtime/TemporalPlainYearMonthPrototype.cpp
M Source/JavaScriptCore/runtime/temporal/core/CalendarFields.cpp
M Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.cpp
M Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.h
M Source/JavaScriptCore/runtime/temporal/core/TimeZoneICUBridge.cpp
Log Message:
-----------
[JSC][Temporal] Give the ICU paths an error channel instead of plausible
values
https://bugs.webkit.org/show_bug.cgi?id=321477
rdar://184567556
Reviewed by Yusuke Suzuki.
Sites across the calendar and time zone bridges folded an ICU failure into a
legitimate-looking answer. No test: none of it is reachable while ICU is
healthy -- extreme
years on all eight non-ISO calendars, hebrew year 0, PlainYearMonth diffs at
both range ends
and far-future transitions behave identically before and after.
yearContainsMonthCode short-circuited on `cal &&`, so a failed calendar open
read as "this
year has no such month" and constrainMonthCodeGivenContainment rewrote the
month -- for
hebrew a valid M05L became M06, bypassing overflow: "reject".
monthCodeOrdinalInYear fell
back to monthCode.monthNumber, losing the leap-month shift, and
resolveMonthCodeToOrdinal
had three failure paths returning 1, which fed the year count in
calendarDateUntil. The
isHebrewYear0 trio folded a read failure into false, so callers skipped the
hebrew
year-0 Kislev correction. All return optional or TemporalResult now; the genuine
constrain-backward exits stay distinct from the failure exits, and
monthCodeOrdinalInYear's
ASSERT goes with the type change.
getTimeZoneTransition's offset check reused the UErrorCode
ucal_getTimeZoneTransitionDate
had written, and ICU is sticky, so after any upstream failure all six calls
no-oped to zero
and it returned the transition regardless. It reuses getOffsetMsAtEpoch now.
PlainYearMonth
until/since and monthDayFromFields no longer fall back to a value on failure.
Canonical link: https://commits.webkit.org/318953@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications