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 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 if (IsDataDescriptor(desc) && desc.isWritable()) return false; | 1168 if (IsDataDescriptor(desc) && desc.isWritable()) return false; |
1169 if (desc.isConfigurable()) return false; | 1169 if (desc.isConfigurable()) return false; |
1170 } | 1170 } |
1171 return true; | 1171 return true; |
1172 } | 1172 } |
1173 | 1173 |
1174 | 1174 |
1175 // ES5 section 15.2.3.13 | 1175 // ES5 section 15.2.3.13 |
1176 function ObjectIsExtensible(obj) { | 1176 function ObjectIsExtensible(obj) { |
1177 if (!IS_SPEC_OBJECT(obj)) return false; | 1177 if (!IS_SPEC_OBJECT(obj)) return false; |
1178 if (%_IsJSProxy(obj)) { | |
1179 return true; | |
1180 } | |
1181 return %IsExtensible(obj); | 1178 return %IsExtensible(obj); |
1182 } | 1179 } |
1183 | 1180 |
1184 | 1181 |
1185 // ECMA-262, Edition 6, section 19.1.2.1 | 1182 // ECMA-262, Edition 6, section 19.1.2.1 |
1186 function ObjectAssign(target, sources) { | 1183 function ObjectAssign(target, sources) { |
1187 // TODO(bmeurer): Move this to toplevel. | 1184 // TODO(bmeurer): Move this to toplevel. |
1188 "use strict"; | 1185 "use strict"; |
1189 var to = TO_OBJECT(target); | 1186 var to = TO_OBJECT(target); |
1190 var argsLen = %_ArgumentsLength(); | 1187 var argsLen = %_ArgumentsLength(); |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1765 | 1762 |
1766 %InstallToContext([ | 1763 %InstallToContext([ |
1767 "global_eval_fun", GlobalEval, | 1764 "global_eval_fun", GlobalEval, |
1768 "object_value_of", ObjectValueOf, | 1765 "object_value_of", ObjectValueOf, |
1769 "object_to_string", ObjectToString, | 1766 "object_to_string", ObjectToString, |
1770 "object_get_own_property_descriptor", ObjectGetOwnPropertyDescriptor, | 1767 "object_get_own_property_descriptor", ObjectGetOwnPropertyDescriptor, |
1771 "to_complete_property_descriptor", ToCompletePropertyDescriptor, | 1768 "to_complete_property_descriptor", ToCompletePropertyDescriptor, |
1772 ]); | 1769 ]); |
1773 | 1770 |
1774 }) | 1771 }) |
OLD | NEW |