| 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 | 562 |
| 563 // Harmony proxies. | 563 // Harmony proxies. |
| 564 function DefineProxyProperty(obj, p, attributes, should_throw) { | 564 function DefineProxyProperty(obj, p, attributes, should_throw) { |
| 565 // TODO(rossberg): adjust once there is a story for symbols vs proxies. | 565 // TODO(rossberg): adjust once there is a story for symbols vs proxies. |
| 566 if (IS_SYMBOL(p)) return false; | 566 if (IS_SYMBOL(p)) return false; |
| 567 | 567 |
| 568 var handler = %GetHandler(obj); | 568 var handler = %GetHandler(obj); |
| 569 var result = CallTrap2(handler, "defineProperty", UNDEFINED, p, attributes); | 569 var result = CallTrap2(handler, "defineProperty", UNDEFINED, p, attributes); |
| 570 if (!result) { | 570 if (!result) { |
| 571 if (should_throw) { | 571 if (should_throw) { |
| 572 throw MakeTypeError(kProxyHandlerReturned, | 572 throw MakeTypeError(kProxyTrapReturned, |
| 573 handler, "false", "defineProperty"); | 573 handler, "false", "defineProperty"); |
| 574 } else { | 574 } else { |
| 575 return false; | 575 return false; |
| 576 } | 576 } |
| 577 } | 577 } |
| 578 return true; | 578 return true; |
| 579 } | 579 } |
| 580 | 580 |
| 581 | 581 |
| 582 // ES6 9.1.6 [[DefineOwnProperty]](P, Desc) | 582 // ES6 9.1.6 [[DefineOwnProperty]](P, Desc) |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1518 to.ObjectToString = ObjectToString; | 1518 to.ObjectToString = ObjectToString; |
| 1519 }); | 1519 }); |
| 1520 | 1520 |
| 1521 %InstallToContext([ | 1521 %InstallToContext([ |
| 1522 "global_eval_fun", GlobalEval, | 1522 "global_eval_fun", GlobalEval, |
| 1523 "object_value_of", ObjectValueOf, | 1523 "object_value_of", ObjectValueOf, |
| 1524 "object_to_string", ObjectToString, | 1524 "object_to_string", ObjectToString, |
| 1525 ]); | 1525 ]); |
| 1526 | 1526 |
| 1527 }) | 1527 }) |
| OLD | NEW |