Status: WorkingAsIntended
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Priority-Medium
New issue 3056 by [email protected]: getOwnPropertyNames does not return
names in the insertion order
http://code.google.com/p/v8/issues/detail?id=3056
var o = {};
for (var i = 0; i < 10; i++) {
o['_' + String.fromCharCode(i)] = i;
}
Object.getOwnPropertyNames(o).map(function(n) { return o[n]; })
Returns
[4, 1, 2, 3, 9, 6, 7, 0, 8, 5]
but the expected result is
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
This is because the object is in slow mode due to the non ascii
identifiers. The same thing happens if the keys are all ascii but there are
too many or we delete a key. In other words in happens to all slow mode
object.
This is not a violation of ES5 or ES6 but it might be unexpected
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.