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 var $functionSourceString; | 5 var $functionSourceString; |
6 var $globalEval; | 6 var $globalEval; |
7 var $objectDefineOwnProperty; | 7 var $objectDefineOwnProperty; |
8 var $objectGetOwnPropertyDescriptor; | 8 var $objectGetOwnPropertyDescriptor; |
9 var $toCompletePropertyDescriptor; | 9 var $toCompletePropertyDescriptor; |
10 | 10 |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 | 583 |
584 return ConvertDescriptorArrayToDescriptor(props); | 584 return ConvertDescriptorArrayToDescriptor(props); |
585 } | 585 } |
586 | 586 |
587 | 587 |
588 // ES5 section 8.12.7. | 588 // ES5 section 8.12.7. |
589 function Delete(obj, p, should_throw) { | 589 function Delete(obj, p, should_throw) { |
590 var desc = GetOwnPropertyJS(obj, p); | 590 var desc = GetOwnPropertyJS(obj, p); |
591 if (IS_UNDEFINED(desc)) return true; | 591 if (IS_UNDEFINED(desc)) return true; |
592 if (desc.isConfigurable()) { | 592 if (desc.isConfigurable()) { |
593 %DeleteProperty(obj, p, 0); | 593 %DeleteProperty_Sloppy(obj, p); |
594 return true; | 594 return true; |
595 } else if (should_throw) { | 595 } else if (should_throw) { |
596 throw MakeTypeError(kDefineDisallowed, p); | 596 throw MakeTypeError(kDefineDisallowed, p); |
597 } else { | 597 } else { |
598 return; | 598 return; |
599 } | 599 } |
600 } | 600 } |
601 | 601 |
602 | 602 |
603 // ES6, draft 12-24-14, section 7.3.8 | 603 // ES6, draft 12-24-14, section 7.3.8 |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1808 to.ObjectGetOwnPropertyKeys = ObjectGetOwnPropertyKeys; | 1808 to.ObjectGetOwnPropertyKeys = ObjectGetOwnPropertyKeys; |
1809 to.ObjectHasOwnProperty = ObjectHasOwnProperty; | 1809 to.ObjectHasOwnProperty = ObjectHasOwnProperty; |
1810 to.ObjectIsFrozen = ObjectIsFrozen; | 1810 to.ObjectIsFrozen = ObjectIsFrozen; |
1811 to.ObjectIsSealed = ObjectIsSealed; | 1811 to.ObjectIsSealed = ObjectIsSealed; |
1812 to.ObjectToString = ObjectToString; | 1812 to.ObjectToString = ObjectToString; |
1813 to.OwnPropertyKeys = OwnPropertyKeys; | 1813 to.OwnPropertyKeys = OwnPropertyKeys; |
1814 to.ToNameArray = ToNameArray; | 1814 to.ToNameArray = ToNameArray; |
1815 }); | 1815 }); |
1816 | 1816 |
1817 }) | 1817 }) |
OLD | NEW |