Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index 9bb4b8367e5213a901eb19d34fff40deb7478a2a..ad7f18aaf1920a496d6634c9771141e4995ad148 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -1107,9 +1107,7 @@ function ObjectGetOwnPropertyKeys(obj, symbolsOnly) { |
// ES5 section 15.2.3.4. |
function ObjectGetOwnPropertyNames(obj) { |
- if (!IS_SPEC_OBJECT(obj)) { |
- throw MakeTypeError("called_on_non_object", ["Object.getOwnPropertyNames"]); |
- } |
+ obj = ToObject(obj); |
// Special handling for proxies. |
if (%IsJSProxy(obj)) { |
var handler = %GetHandler(obj); |