Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index b002be3461852c65df3962e01354134d75b35f12..f556c397399332cff46f594dd010492fdacf614d 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -174,15 +174,18 @@ function ObjectValueOf() { |
// ECMA-262 - 15.2.4.5 |
-function ObjectHasOwnProperty(V) { |
- if (%_IsJSProxy(this)) { |
+function ObjectHasOwnProperty(value) { |
+ var name = $toName(value); |
+ var object = TO_OBJECT_INLINE(this); |
+ |
+ if (%_IsJSProxy(object)) { |
// TODO(rossberg): adjust once there is a story for symbols vs proxies. |
- if (IS_SYMBOL(V)) return false; |
+ if (IS_SYMBOL(value)) return false; |
- var handler = %GetHandler(this); |
- return CallTrap1(handler, "hasOwn", ProxyDerivedHasOwnTrap, $toName(V)); |
+ var handler = %GetHandler(object); |
+ return CallTrap1(handler, "hasOwn", ProxyDerivedHasOwnTrap, name); |
} |
- return %HasOwnProperty(TO_OBJECT_INLINE(this), $toName(V)); |
+ return %HasOwnProperty(object, name); |
} |