Status: Accepted
Owner: [email protected]
Labels: Type-Bug Priority-Medium

New issue 1150 by [email protected]: Object.keys and Object.getOwnPropertyDescriptor disagree for global variables
http://code.google.com/p/v8/issues/detail?id=1150

var a = 10;
var global = (function () { return this; }) ();
print (JSON.stringify(Object.keys(global)));
print (JSON.stringify(Object.getOwnPropertyDescriptor(global, "a")));

outputs

[]
{"value":10,"writable":true,"enumerable":true,"configurable":false}

a is an enumerable own property of global thus I would expect it to be in the array returned by Object.keys but it is not there.

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

Reply via email to