Parents: #495, #473 Related: #672, #674, #687
Problem
Private C/ABI name and diagnostic helpers still return Value.asStr() for user-controlled function name/displayName, Symbol.toStringTag, and constructor-name data properties. That slice is the StringCell physical image, not canonical WTF-8. Once flat Latin-1 storage is active, non-ASCII names can escape as raw one-byte code units, producing invalid UTF-8 and representation-dependent class/diagnostic output.
Scope
- Canonicalize callable display names, class names, and no-side-effect diagnostic name rendering at the owning Context/Interpreter boundary.
- Cover
JSC__JSValue__getNameProperty,getClassName,getName, calculated-display-name exports, invalid-argument type formatting, and object inspection paths that share these helpers. - Preserve own-data-first lookup, Proxy/getter avoidance, constructor/tag precedence, borrowed-view lifetime, and exact observable exception ordering.
- Propagate OOM through the existing pending-exception/private-string channels; do not substitute, truncate, retry, or expose physical bytes.
- Add a real flat-storage witness for Latin-1 names/tags plus canonical-storage controls.
No-workaround rules
- No global canonicalization, forced UTF-16 storage, lossy UTF-8 repair, ASCII-only restriction, hidden getter invocation, or allocation-failure fallback.
- No stacks, queues, jobs, Promise, microtask, Worker-lifecycle, or Map/Set iterator changes.
Acceptance
- Every affected name/class/diagnostic egress path consumes canonical WTF-8.
- Flat Latin-1 and canonical storage produce byte-identical public output for non-ASCII names and tags.
- Proxy/getter avoidance, constructor/tag precedence, borrowed lifetime, and OOM behavior remain exact.
- Focused Debug/forced-flat/TSan, full units, ABI fixtures, and applicable Test262 inventories pass with exact accounting.