| 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 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 if (IsDataDescriptor(desc) && desc.isWritable()) return false; | 1214 if (IsDataDescriptor(desc) && desc.isWritable()) return false; |
| 1215 if (desc.isConfigurable()) return false; | 1215 if (desc.isConfigurable()) return false; |
| 1216 } | 1216 } |
| 1217 return true; | 1217 return true; |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 | 1220 |
| 1221 // ES5 section 15.2.3.13 | 1221 // ES5 section 15.2.3.13 |
| 1222 function ObjectIsExtensible(obj) { | 1222 function ObjectIsExtensible(obj) { |
| 1223 if (!IS_SPEC_OBJECT(obj)) return false; | 1223 if (!IS_SPEC_OBJECT(obj)) return false; |
| 1224 if (%_IsJSProxy(obj)) { | |
| 1225 return true; | |
| 1226 } | |
| 1227 return %IsExtensible(obj); | 1224 return %IsExtensible(obj); |
| 1228 } | 1225 } |
| 1229 | 1226 |
| 1230 | 1227 |
| 1231 // ECMA-262, Edition 6, section 19.1.2.1 | 1228 // ECMA-262, Edition 6, section 19.1.2.1 |
| 1232 function ObjectAssign(target, sources) { | 1229 function ObjectAssign(target, sources) { |
| 1233 // TODO(bmeurer): Move this to toplevel. | 1230 // TODO(bmeurer): Move this to toplevel. |
| 1234 "use strict"; | 1231 "use strict"; |
| 1235 var to = TO_OBJECT(target); | 1232 var to = TO_OBJECT(target); |
| 1236 var argsLen = %_ArgumentsLength(); | 1233 var argsLen = %_ArgumentsLength(); |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 | 1808 |
| 1812 %InstallToContext([ | 1809 %InstallToContext([ |
| 1813 "global_eval_fun", GlobalEval, | 1810 "global_eval_fun", GlobalEval, |
| 1814 "object_value_of", ObjectValueOf, | 1811 "object_value_of", ObjectValueOf, |
| 1815 "object_to_string", ObjectToString, | 1812 "object_to_string", ObjectToString, |
| 1816 "object_get_own_property_descriptor", ObjectGetOwnPropertyDescriptor, | 1813 "object_get_own_property_descriptor", ObjectGetOwnPropertyDescriptor, |
| 1817 "to_complete_property_descriptor", ToCompletePropertyDescriptor, | 1814 "to_complete_property_descriptor", ToCompletePropertyDescriptor, |
| 1818 ]); | 1815 ]); |
| 1819 | 1816 |
| 1820 }) | 1817 }) |
| OLD | NEW |