Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index f1e8084a53038dff8d8c33a888d2e1bf41311af4..86f07a195ae499ace4efdb430547493e07184133 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -337,7 +337,7 @@ function ObjectKeys(obj) { |
if (%IsJSProxy(obj)) { |
var handler = %GetHandler(obj); |
var names = CallTrap0(handler, "keys", DerivedKeysTrap); |
- return ToStringArray(names); |
+ return ToStringArray(names, "keys"); |
} |
return %LocalKeys(obj); |
} |
@@ -963,7 +963,7 @@ function ToStringArray(obj, trap) { |
var names = {}; // TODO(rossberg): use sets once they are ready. |
for (var index = 0; index < n; index++) { |
var s = ToString(obj[index]); |
- if (s in names) { |
+ if (%HasLocalProperty(names, s)) { |
throw MakeTypeError("proxy_repeated_prop_name", [obj, trap, s]); |
} |
array[index] = s; |