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 // This file relies on the fact that the following declarations have been made | 5 // This file relies on the fact that the following declarations have been made |
6 // in runtime.js: | 6 // in runtime.js: |
7 // var $Object = global.Object; | 7 // var $Object = global.Object; |
8 // var $Boolean = global.Boolean; | 8 // var $Boolean = global.Boolean; |
9 // var $Number = global.Number; | 9 // var $Number = global.Number; |
10 // var $Function = global.Function; | 10 // var $Function = global.Function; |
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1315 if (%IsJSProxy(obj)) { | 1315 if (%IsJSProxy(obj)) { |
1316 return false; | 1316 return false; |
1317 } | 1317 } |
1318 if (%IsExtensible(obj)) { | 1318 if (%IsExtensible(obj)) { |
1319 return false; | 1319 return false; |
1320 } | 1320 } |
1321 var names = ObjectGetOwnPropertyNames(obj); | 1321 var names = ObjectGetOwnPropertyNames(obj); |
1322 for (var i = 0; i < names.length; i++) { | 1322 for (var i = 0; i < names.length; i++) { |
1323 var name = names[i]; | 1323 var name = names[i]; |
1324 var desc = GetOwnPropertyJS(obj, name); | 1324 var desc = GetOwnPropertyJS(obj, name); |
1325 if (desc.isConfigurable()) return false; | 1325 if (desc.isConfigurable()) { |
1326 %DebugPrint(name); | |
Igor Sheludko
2014/07/18 13:08:31
Spurious change?
| |
1327 return false; | |
1328 } | |
1326 } | 1329 } |
1327 return true; | 1330 return true; |
1328 } | 1331 } |
1329 | 1332 |
1330 | 1333 |
1331 // ES5 section 15.2.3.12 | 1334 // ES5 section 15.2.3.12 |
1332 function ObjectIsFrozen(obj) { | 1335 function ObjectIsFrozen(obj) { |
1333 if (!IS_SPEC_OBJECT(obj)) { | 1336 if (!IS_SPEC_OBJECT(obj)) { |
1334 throw MakeTypeError("called_on_non_object", ["Object.isFrozen"]); | 1337 throw MakeTypeError("called_on_non_object", ["Object.isFrozen"]); |
1335 } | 1338 } |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1863 %SetCode($Function, FunctionConstructor); | 1866 %SetCode($Function, FunctionConstructor); |
1864 %AddNamedProperty($Function.prototype, "constructor", $Function, DONT_ENUM); | 1867 %AddNamedProperty($Function.prototype, "constructor", $Function, DONT_ENUM); |
1865 | 1868 |
1866 InstallFunctions($Function.prototype, DONT_ENUM, $Array( | 1869 InstallFunctions($Function.prototype, DONT_ENUM, $Array( |
1867 "bind", FunctionBind, | 1870 "bind", FunctionBind, |
1868 "toString", FunctionToString | 1871 "toString", FunctionToString |
1869 )); | 1872 )); |
1870 } | 1873 } |
1871 | 1874 |
1872 SetUpFunction(); | 1875 SetUpFunction(); |
OLD | NEW |