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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 561 |
562 // Harmony proxies. | 562 // Harmony proxies. |
563 function DefineProxyProperty(obj, p, attributes, should_throw) { | 563 function DefineProxyProperty(obj, p, attributes, should_throw) { |
564 // TODO(rossberg): adjust once there is a story for symbols vs proxies. | 564 // TODO(rossberg): adjust once there is a story for symbols vs proxies. |
565 if (IS_SYMBOL(p)) return false; | 565 if (IS_SYMBOL(p)) return false; |
566 | 566 |
567 var handler = %GetHandler(obj); | 567 var handler = %GetHandler(obj); |
568 var result = CallTrap2(handler, "defineProperty", UNDEFINED, p, attributes); | 568 var result = CallTrap2(handler, "defineProperty", UNDEFINED, p, attributes); |
569 if (!result) { | 569 if (!result) { |
570 if (should_throw) { | 570 if (should_throw) { |
571 throw MakeTypeError(kProxyHandlerReturned, | 571 throw MakeTypeError(kProxyTrapReturned, |
572 handler, "false", "defineProperty"); | 572 handler, "false", "defineProperty"); |
573 } else { | 573 } else { |
574 return false; | 574 return false; |
575 } | 575 } |
576 } | 576 } |
577 return true; | 577 return true; |
578 } | 578 } |
579 | 579 |
580 | 580 |
581 // ES5 8.12.9. | 581 // ES5 8.12.9. |
(...skipping 936 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 |