Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4f049dc9046e56f460fc85d239c1a15e9b6ba3c6
https://github.com/WebKit/WebKit/commit/4f049dc9046e56f460fc85d239c1a15e9b6ba3c6
Author: Yijia Huang <[email protected]>
Date: 2026-08-04 (Tue, 04 Aug 2026)
Changed paths:
A JSTests/stress/temporal-calendar-fields-monthcode-typeerror.js
A JSTests/stress/temporal-plaindatetime-from-getter-order.js
M Source/JavaScriptCore/runtime/TemporalCalendar.cpp
M Source/JavaScriptCore/runtime/TemporalCalendar.h
M Source/JavaScriptCore/runtime/TemporalDuration.cpp
M Source/JavaScriptCore/runtime/TemporalObject.h
M Source/JavaScriptCore/runtime/TemporalPlainDate.cpp
M Source/JavaScriptCore/runtime/TemporalPlainDate.h
M Source/JavaScriptCore/runtime/TemporalPlainDatePrototype.cpp
M Source/JavaScriptCore/runtime/TemporalPlainDateTime.cpp
M Source/JavaScriptCore/runtime/TemporalPlainDateTimePrototype.cpp
M Source/JavaScriptCore/runtime/temporal/core/CalendarFields.cpp
Log Message:
-----------
[JSC][Temporal] Finish PrepareCalendarFields consolidation; fix monthCode
TypeError regression
https://bugs.webkit.org/show_bug.cgi?id=320953
rdar://183980712
Reviewed by Yusuke Suzuki.
Route PlainDateTime.from/with, PlainDate.prototype.with's ISO branch, and
Duration.relativeTo through the two shared calendar-field readers instead of
their own duplicate PrepareCalendarFields/CalendarMergeFields logic.
Delete the now-redundant TemporalPlainDate::mergeDateFields, which
also fixes a latent bug: it caused ISO .with() to run day/month regulation
twice per call.
Give plainDateWith an ISO fast path (mirroring plainYearMonthWith's) so
unifying with()'s ISO/non-ISO branches doesn't regress perf by routing ISO
through isoToCalendarFields's ICU calendar construction.
Fix readCalendarFieldsFromObject's monthCode handling: it silently accepted
non-string values instead of throwing TypeError, losing behavior that
PlainDateTime.from and PlainDate.with's ISO branch used to have correctly
before this consolidation.
Tests: JSTests/stress/temporal-calendar-fields-monthcode-typeerror.js
JSTests/stress/temporal-plaindatetime-from-getter-order.js
Canonical link: https://commits.webkit.org/318566@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications