Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 89c1884e15a927c5dd681311418d44b66cf8012e
      
https://github.com/WebKit/WebKit/commit/89c1884e15a927c5dd681311418d44b66cf8012e
  Author: Yijia Huang <[email protected]>
  Date:   2026-08-03 (Mon, 03 Aug 2026)

  Changed paths:
    M Source/JavaScriptCore/runtime/ISO8601.cpp
    M Source/JavaScriptCore/runtime/ISO8601.h
    M Source/JavaScriptCore/runtime/TemporalCalendar.cpp
    M Source/JavaScriptCore/runtime/TemporalCalendar.h
    M Source/JavaScriptCore/runtime/TemporalObject.h
    M Source/JavaScriptCore/runtime/TemporalPlainDatePrototype.cpp
    M Source/JavaScriptCore/runtime/TemporalPlainMonthDayConstructor.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/ISOArithmetic.cpp

  Log Message:
  -----------
  [JSC][Temporal] Guard PlainDate construction against out-of-range years; 
consolidate CalendarResolveFields
https://bugs.webkit.org/show_bug.cgi?id=320927
rdar://183960408

Reviewed by Yusuke Suzuki.

PlainDate's constructor now sanitizes `year` itself instead of asserting and
trusting every caller to check first — this was crashing on debug builds
(e.g. indianSakaToISO, huge duration arithmetic) and silently wrapping
values incorrectly in a couple of places. Added an int64_t overload and a
sentinel() factory for callers whose month/day may be equally untrustworthy.

Also fixed PlainYearMonth.prototype.toPlainDate misusing the year sentinel
as a day poison value (wrong clamp direction under overflow:constrain), and
a possible UB static_cast in the PlainMonthDay constructor.

Consolidated CalendarResolveFields/CalendarDateToISO into single
implementations in CalendarFields.cpp, removing a second undocumented
duplicate in TemporalCalendar.cpp and monthDayFromFields's own internal
duplication.

Canonical link: https://commits.webkit.org/318504@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to