| Index: src/v8natives.js
|
| diff --git a/src/v8natives.js b/src/v8natives.js
|
| index bc6a375d7513050c004de62ba3fd9f91a7fd00ba..782b953ea9763edf0dadbc32511d32a6deef0463 100644
|
| --- a/src/v8natives.js
|
| +++ b/src/v8natives.js
|
| @@ -325,7 +325,9 @@ function ObjectLookupSetter(name) {
|
|
|
|
|
| function ObjectKeys(obj) {
|
| - obj = ToObject(obj);
|
| + if (!IS_SPEC_OBJECT(obj)) {
|
| + throw MakeTypeError("called_on_non_object", ["Object.keys"]);
|
| + }
|
| if (%IsJSProxy(obj)) {
|
| var handler = %GetHandler(obj);
|
| var names = CallTrap0(handler, "keys", DerivedKeysTrap);
|
|
|