| Index: src/v8natives.js
|
| diff --git a/src/v8natives.js b/src/v8natives.js
|
| index be92347768a71867c546785641dff8b6718ceb60..b63ce5f1082519d0543dd276f301631e74e25af7 100644
|
| --- a/src/v8natives.js
|
| +++ b/src/v8natives.js
|
| @@ -276,6 +276,13 @@ function ObjectLookupSetter(name) {
|
| }
|
|
|
|
|
| +function ObjectKeys(obj) {
|
| + if (!IS_OBJECT(obj) || IS_NULL_OR_UNDEFINED(obj))
|
| + throw MakeTypeError('object_keys_non_object', [obj]);
|
| + return %LocalKeys(obj);
|
| +}
|
| +
|
| +
|
| %SetCode($Object, function(x) {
|
| if (%_IsConstructCall()) {
|
| if (x == null) return this;
|
| @@ -304,6 +311,9 @@ function SetupObject() {
|
| "__defineSetter__", ObjectDefineSetter,
|
| "__lookupSetter__", ObjectLookupSetter
|
| ));
|
| + InstallFunctions($Object, DONT_ENUM, $Array(
|
| + "keys", ObjectKeys
|
| + ));
|
| }
|
|
|
| SetupObject();
|
|
|