archives

« Bugzilla Issues Index

#2053 — 19.1.3.3, Object.defineProperties: enumeration order note does not take symbols into account


19.1.3.3, Runtime Semantics: ObjectDefineProperties Abstract Operation:

> If an implementation defines a specific order of enumeration for the for-in statement, that
> same enumeration order must be used to order the list elements in step 3 of this algorithm.

for-in does not enumerate symbol valued property keys, but ObjectDefineProperties does. Maybe enhance the note to say the enumeration order is only relevant for string valued property keys? And also say this restriction only applies to ordinary objects?


ObjectDefinePrpoerties is now uses the ordering produced by [[OwnPropertyKeys]] which is well defined for ordinary objects and includes symbols.

This is technically a breaking change for some implementations, but the old for-in ordering was implementation defined so in practice it's probably not very significant.

fixed in rev26 editor's draft


in rev26 draft