OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 | 782 |
783 // ES5 section 15.2.3.11 | 783 // ES5 section 15.2.3.11 |
784 function ObjectIsSealed(obj) { | 784 function ObjectIsSealed(obj) { |
785 if (!IS_SPEC_OBJECT(obj)) { | 785 if (!IS_SPEC_OBJECT(obj)) { |
786 throw MakeTypeError("obj_ctor_property_non_object", ["isSealed"]); | 786 throw MakeTypeError("obj_ctor_property_non_object", ["isSealed"]); |
787 } | 787 } |
788 var names = ObjectGetOwnPropertyNames(obj); | 788 var names = ObjectGetOwnPropertyNames(obj); |
789 for (var i = 0; i < names.length; i++) { | 789 for (var i = 0; i < names.length; i++) { |
790 var name = names[i]; | 790 var name = names[i]; |
791 var desc = GetOwnProperty(obj, name); | 791 var desc = GetOwnProperty(obj, name); |
792 if (desc.isConfigurable()) return false; | 792 if (desc.isConfigurable()) return false; |
793 } | 793 } |
794 if (!ObjectIsExtensible(obj)) { | 794 if (!ObjectIsExtensible(obj)) { |
795 return true; | 795 return true; |
796 } | 796 } |
797 return false; | 797 return false; |
798 } | 798 } |
799 | 799 |
800 | 800 |
801 // ES5 section 15.2.3.12 | 801 // ES5 section 15.2.3.12 |
802 function ObjectIsFrozen(obj) { | 802 function ObjectIsFrozen(obj) { |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 // ---------------------------------------------------------------------------- | 1180 // ---------------------------------------------------------------------------- |
1181 | 1181 |
1182 function SetupFunction() { | 1182 function SetupFunction() { |
1183 InstallFunctions($Function.prototype, DONT_ENUM, $Array( | 1183 InstallFunctions($Function.prototype, DONT_ENUM, $Array( |
1184 "bind", FunctionBind, | 1184 "bind", FunctionBind, |
1185 "toString", FunctionToString | 1185 "toString", FunctionToString |
1186 )); | 1186 )); |
1187 } | 1187 } |
1188 | 1188 |
1189 SetupFunction(); | 1189 SetupFunction(); |
OLD | NEW |