Status: New
Owner: ----

New issue 600 by [email protected]: Object.getOwnPropertyNames returns integers for array instance keys.
http://code.google.com/p/v8/issues/detail?id=600

When I call Object.getOwnPropertyNames on an array object, I get integers instead of strings for the key names. Calling Object.keys on the same array gives the keys as strings and doesn't show
length as expected.

Here is test code from latest node (using latest released v8)

node> [Object.keys([1,2,3]),Object.getOwnPropertyNames([1,2,3])]
[
 [
  "0",
  "1",
  "2"
 ],
 [
  0,
  1,
  2,
  "length"
 ]
]

I think getOwnPropertyNames should always return strings for key names regardless of how it's
stored internally.  (I assume this is an array optimization somewhere)


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to