archives

« Bugzilla Issues Index

#2572 — 23.*: Align internal key checks for keyed collections


23.1 Map and 23.2 Set:
Map.prototype.{delete, get, has, set} does not check for empty keys. All other Map.prototype, %MapIteratorPrototype%, Set.prototype and %SetIteratorPrototype% methods explicitly check for empty values.
Maybe add empty value checks to Map.prototype.{delete, get, has, set}?


23.3 WeakMap and 23.4 WeakSet:
WeakMap.prototype.{delete, get, has, set} does not check for empty keys and uses prose for object comparison ("p.[[key]] and key are the same object"), whereas WeakSet.prototype explicitly checks for empty values and uses the SameValue() abstract operation.
Maybe add empty value checks to WeakMap.prototype.{delete, get, has, set} and uniformly use SameValue?


fixed in rev23 editor's draft


fixed in rev23 draft