The precise meaning of "For each named own enumerable property name P of O"

Jeff Walden jwalden+es at MIT.EDU
Wed Aug 12 13:04:02 PDT 2009

What is the behavior when the body of the loop may have side effects?  There are a number of these for the Object.* hooks, but I'm most specifically considering Object.defineProperties, in the case when some getter executed in the body of that loop (also in ToPropertyDescriptor) results in a new property being added, a future property being removed, a property being readded with the same name (does it attempt to define the property twice?) -- all the usual enumeration hazards, but most particularly the last one because of potential weirdness of defining the same property twice with conflicting attributes between the two property descriptors (if the appropriate behavior were specified to trigger that).


More information about the es-discuss mailing list