| 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 if (should_throw) { | 566 if (should_throw) { |
| 567 throw MakeTypeError(kRedefineDisallowed, p); | 567 throw MakeTypeError(kRedefineDisallowed, p); |
| 568 } else { | 568 } else { |
| 569 return false; | 569 return false; |
| 570 } | 570 } |
| 571 } | 571 } |
| 572 // Step 10a | 572 // Step 10a |
| 573 if (IsDataDescriptor(current) && IsDataDescriptor(desc)) { | 573 if (IsDataDescriptor(current) && IsDataDescriptor(desc)) { |
| 574 var currentIsWritable = current.isWritable(); | 574 var currentIsWritable = current.isWritable(); |
| 575 if (currentIsWritable != desc.isWritable()) { | 575 if (currentIsWritable != desc.isWritable()) { |
| 576 if (!currentIsWritable || IS_STRONG(obj)) { | 576 if (!currentIsWritable) { |
| 577 if (should_throw) { | 577 if (should_throw) { |
| 578 throw currentIsWritable | 578 throw MakeTypeError(kRedefineDisallowed, p); |
| 579 ? MakeTypeError(kStrongRedefineDisallowed, obj, p) | |
| 580 : MakeTypeError(kRedefineDisallowed, p); | |
| 581 } else { | 579 } else { |
| 582 return false; | 580 return false; |
| 583 } | 581 } |
| 584 } | 582 } |
| 585 } | 583 } |
| 586 if (!currentIsWritable && desc.hasValue() && | 584 if (!currentIsWritable && desc.hasValue() && |
| 587 !%SameValue(desc.getValue(), current.getValue())) { | 585 !%SameValue(desc.getValue(), current.getValue())) { |
| 588 if (should_throw) { | 586 if (should_throw) { |
| 589 throw MakeTypeError(kRedefineDisallowed, p); | 587 throw MakeTypeError(kRedefineDisallowed, p); |
| 590 } else { | 588 } else { |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 to.ObjectDefineProperties = ObjectDefineProperties; | 1098 to.ObjectDefineProperties = ObjectDefineProperties; |
| 1101 to.ObjectDefineProperty = ObjectDefineProperty; | 1099 to.ObjectDefineProperty = ObjectDefineProperty; |
| 1102 to.ObjectHasOwnProperty = GlobalObject.prototype.hasOwnProperty; | 1100 to.ObjectHasOwnProperty = GlobalObject.prototype.hasOwnProperty; |
| 1103 }); | 1101 }); |
| 1104 | 1102 |
| 1105 %InstallToContext([ | 1103 %InstallToContext([ |
| 1106 "object_value_of", ObjectValueOf, | 1104 "object_value_of", ObjectValueOf, |
| 1107 ]); | 1105 ]); |
| 1108 | 1106 |
| 1109 }) | 1107 }) |
| OLD | NEW |