OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 (function(global, utils) { | 5 (function(global, utils) { |
6 | 6 |
7 %CheckIsBootstrapping(); | 7 %CheckIsBootstrapping(); |
8 | 8 |
9 // ---------------------------------------------------------------------------- | 9 // ---------------------------------------------------------------------------- |
10 // Imports | 10 // Imports |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 var handler = %GetHandler(object); | 186 var handler = %GetHandler(object); |
187 return CallTrap1(handler, "hasOwn", ProxyDerivedHasOwnTrap, name); | 187 return CallTrap1(handler, "hasOwn", ProxyDerivedHasOwnTrap, name); |
188 } | 188 } |
189 return %HasOwnProperty(object, name); | 189 return %HasOwnProperty(object, name); |
190 } | 190 } |
191 | 191 |
192 | 192 |
193 // ECMA-262 - 15.2.4.6 | 193 // ECMA-262 - 15.2.4.6 |
194 function ObjectIsPrototypeOf(V) { | 194 function ObjectIsPrototypeOf(V) { |
195 if (!IS_SPEC_OBJECT(V)) return false; | 195 if (!IS_SPEC_OBJECT(V)) return false; |
196 CHECK_OBJECT_COERCIBLE(this, "Object.prototype.isPrototypeOf"); | 196 var O = TO_OBJECT(this); |
197 return %IsInPrototypeChain(this, V); | 197 return %_HasInPrototypeChain(V, O); |
198 } | 198 } |
199 | 199 |
200 | 200 |
201 // ECMA-262 - 15.2.4.6 | 201 // ECMA-262 - 15.2.4.6 |
202 function ObjectPropertyIsEnumerable(V) { | 202 function ObjectPropertyIsEnumerable(V) { |
203 var P = $toName(V); | 203 var P = $toName(V); |
204 if (%_IsJSProxy(this)) { | 204 if (%_IsJSProxy(this)) { |
205 // TODO(rossberg): adjust once there is a story for symbols vs proxies. | 205 // TODO(rossberg): adjust once there is a story for symbols vs proxies. |
206 if (IS_SYMBOL(V)) return false; | 206 if (IS_SYMBOL(V)) return false; |
207 | 207 |
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1810 }); | 1810 }); |
1811 | 1811 |
1812 utils.ExportToRuntime(function(to) { | 1812 utils.ExportToRuntime(function(to) { |
1813 to["global_eval_fun"] = GlobalEval; | 1813 to["global_eval_fun"] = GlobalEval; |
1814 to["object_define_own_property"] = DefineOwnPropertyFromAPI; | 1814 to["object_define_own_property"] = DefineOwnPropertyFromAPI; |
1815 to["object_get_own_property_descriptor"] = ObjectGetOwnPropertyDescriptor; | 1815 to["object_get_own_property_descriptor"] = ObjectGetOwnPropertyDescriptor; |
1816 to["to_complete_property_descriptor"] = ToCompletePropertyDescriptor; | 1816 to["to_complete_property_descriptor"] = ToCompletePropertyDescriptor; |
1817 }); | 1817 }); |
1818 | 1818 |
1819 }) | 1819 }) |
OLD | NEW |