Files
scriptc/packages
Chris Tate 1ddec6df7c Freeze the symbol-keyed fields of class instances
A frozen class instance kept its symbol-keyed fields writable through
typed references, and Object.isFrozen, isSealed and isExtensible reported
it unfrozen, because the field write checks and the instance's checked
view covered its string-keyed fields only. This held for Object.freeze
through an untyped value and for a typed Object.freeze alike.

- Writes to a symbol-keyed field of a hierarchy with an integrity word are
  checked like other field writes, and throw Node's TypeError naming the
  symbol ("Cannot assign to read only property 'Symbol(tag)' ...").
- The checked view applies the instance's integrity state to its
  symbol-keyed properties too, and the commit of an untyped freeze, seal
  or preventExtensions counts them.
- The commit removes a symbol-keyed field's entry from the property bag
  whatever its attributes (scr_dyn_obj_delete_symbol_field), as it does
  for string-keyed fields, so a sealed view no longer leaves the field's
  old value in the bag.

Corpus 7407 covers freeze and seal of symbol-keyed fields through unknown
and through typed calls, on a class and a subclass, and matches Node.
2026-10-24 01:52:11 -05:00
..
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00
2026-10-23 12:08:08 -05:00