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 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 } | 1004 } |
1005 | 1005 |
1006 | 1006 |
1007 // ------------------------------------------------------------------- | 1007 // ------------------------------------------------------------------- |
1008 | 1008 |
1009 function SetupArray() { | 1009 function SetupArray() { |
1010 // Setup non-enumerable constructor property on the Array.prototype | 1010 // Setup non-enumerable constructor property on the Array.prototype |
1011 // object. | 1011 // object. |
1012 %SetProperty($Array.prototype, "constructor", $Array, DONT_ENUM); | 1012 %SetProperty($Array.prototype, "constructor", $Array, DONT_ENUM); |
1013 | 1013 |
1014 // Setup non-enumerable functions of the Array.prototype object and | 1014 // Setup non-enumerable functions of the Array.prototype object and set their |
1015 // set their names. | 1015 // names. Use DONT_DELETE due to |
1016 InstallFunctions($Array.prototype, DONT_ENUM, $Array( | 1016 // http://code.google.com/p/chromium/issues/detail?id=1717 |
| 1017 InstallFunctions($Array.prototype, DONT_ENUM | DONT_DELETE, $Array( |
1017 "toString", ArrayToString, | 1018 "toString", ArrayToString, |
1018 "toLocaleString", ArrayToLocaleString, | 1019 "toLocaleString", ArrayToLocaleString, |
1019 "join", ArrayJoin, | 1020 "join", ArrayJoin, |
1020 "pop", ArrayPop, | 1021 "pop", ArrayPop, |
1021 "push", ArrayPush, | 1022 "push", ArrayPush, |
1022 "concat", ArrayConcat, | 1023 "concat", ArrayConcat, |
1023 "reverse", ArrayReverse, | 1024 "reverse", ArrayReverse, |
1024 "shift", ArrayShift, | 1025 "shift", ArrayShift, |
1025 "unshift", ArrayUnshift, | 1026 "unshift", ArrayUnshift, |
1026 "slice", ArraySlice, | 1027 "slice", ArraySlice, |
(...skipping 21 matching lines...) Expand all Loading... |
1048 ArrayIndexOf: 1, | 1049 ArrayIndexOf: 1, |
1049 ArrayLastIndexOf: 1, | 1050 ArrayLastIndexOf: 1, |
1050 ArrayPush: 1, | 1051 ArrayPush: 1, |
1051 ArrayReduce: 1, | 1052 ArrayReduce: 1, |
1052 ArrayReduceRight: 1 | 1053 ArrayReduceRight: 1 |
1053 }); | 1054 }); |
1054 } | 1055 } |
1055 | 1056 |
1056 | 1057 |
1057 SetupArray(); | 1058 SetupArray(); |
OLD | NEW |