Summary
Intl.DateTimeFormat already resolves constructor options eagerly into an immutable native IntlDateTimeFormatData sidecar, but its constructor still publishes ordinary NUL-prefixed \0intl and \0locale properties. Branding trusts the forgeable service string, and native publication reads the locale back through ordinary object state. Date/Temporal internal helpers repeat this pseudo-object protocol; Temporal also publishes a separate ordinary permission flag.
Make the native sidecar the sole DateTimeFormat brand and configuration source. Pass the resolved locale directly into native publication, carry the Temporal ZonedDateTime permission in the immutable native record, and retain normative ChainDateTimeFormat behavior through the genuine fallback-symbol inner formatter.
Related: #475, #493, #460. Follows the same security/ownership direction as #591 without touching stacks, queues, jobs, Promise, microtasks, or Worker lifecycle.
Frozen boundary
Current main at eb661dce:
test/intl402/DateTimeFormat: 244/244.- Existing 10-job construction rows match system JavaScriptCore checksums:
- default:
91,475,898 - components:
91,475,898 - style:
91,475,898 - locale:
712,810,236
- default:
These existing rows are the committed behavioral/performance boundary; no benchmark-only path or replacement fixture is needed.
Requirements
IntlDateTimeFormatDatais the only valid DateTimeFormat brand and owns every steady-state configuration bit.- Native publication receives the resolved locale explicitly and performs no lookup of
\0localeor other ordinary formatter state. - Public construction publishes no NUL-prefixed ordinary own properties.
- Date and Temporal locale-string helpers publish complete native state eagerly; Temporal ZonedDateTime permission is immutable native state, not an ordinary property.
resolvedOptions,format,formatToParts,formatRange, andformatRangeToPartsreject forged receivers without observing attacker-controlled hidden properties.- Genuine ChainDateTimeFormat receivers continue to unwrap only through
%Intl%.[[FallbackSymbol]]; the boundformataccessor targets/caches on the genuine inner formatter, while methods not specified to unwrap still reject the outer receiver. - Preserve option observation order, locale extension resolution, OOM rollback, moving/concurrent GC safety, and no-GIL race freedom.
Acceptance
- DateTimeFormat remains 244/244 and complete Intl402 has no regressions against the exact parent.
- Regression coverage proves hidden-property forgery rejection, zero deferred reads, public reflection, Date/Temporal internal helpers, and ChainDateTimeFormat behavior.
- Existing OOM, bounded-heap, moving-nursery, shared-realm, and TSan DateTimeFormat gates pass.
- Exact-parent attribution on the four frozen construction rows reports checksums, property/lock/allocation/GC deltas, and does not promote noisy timing into a public claim.
- Full sharded units pass with zero failures/leaks.