Bug Tracker

Changes between Initial Version and Version 1 of Ticket #11150, comment 12


Ignore:
Timestamp:
Jan 10, 2012, 3:42:41 PM (8 years ago)
Author:
dmethvin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11150, comment 12

    initial v1  
    55Sure enough, ECMA-262, section 12.6.4 says:
    66
    7 > The mechanics and order of enumerating the properties (step 6.a in the first algorithm, step 7.a in the second) is not specified. Properties of the object being enumerated may be deleted during enumeration. If a property
    8 that has not yet been visited during enumeration is deleted, then it will not be visited. If new properties are added to the object being enumerated during enumeration, the newly added properties are not guaranteed to be visited in the active enumeration. A property name must not be visited more than once in any enumeration.
     7> The mechanics and order of enumerating the properties (step 6.a in the first algorithm, step 7.a in the second) is not specified. Properties of the object being enumerated may be deleted during enumeration. If a property that has not yet been visited during enumeration is deleted, then it will not be visited. If new properties are added to the object being enumerated during enumeration, the newly added properties are not guaranteed to be visited in the active enumeration. A property name must not be visited more than once in any enumeration.
    98
    109One way to get a consistent set of results is to obtain the list of keys in advance, before starting the iteration. But that's expensive and potentially wasteful so many iteration classes/implementations try to avoid it.