Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index b63ce5f1082519d0543dd276f301631e74e25af7..3f60109205e10abc9a4db02e353f2f3aee4adbe0 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -277,7 +277,7 @@ function ObjectLookupSetter(name) { |
function ObjectKeys(obj) { |
- if (!IS_OBJECT(obj) || IS_NULL_OR_UNDEFINED(obj)) |
+ if ((!IS_OBJECT(obj) || IS_NULL_OR_UNDEFINED(obj)) && !IS_FUNCTION(obj)) |
throw MakeTypeError('object_keys_non_object', [obj]); |
return %LocalKeys(obj); |
} |