Debian Codegraph @

js/src/tests/non262/Array/regress-456845.js

raw
1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 //-----------------------------------------------------------------------------
7 var BUGNUMBER = 456845;
8 var summary = 'JIT: popArrs[a].pop is not a function';
9 var actual = 'No Error';
10 var expect = 'No Error';
11
12
13 //-----------------------------------------------------------------------------
14 test();
15 //-----------------------------------------------------------------------------
16
17 function test()
18 {
19 printBugNumber(BUGNUMBER);
20 printStatus (summary);
21
22
23 try
24 {
25 var chars = '0123456789abcdef';
26 var size = 1000;
27 var mult = 100;
28
29 var arr = [];
30 var lsize = size;
31 while (lsize--) { arr.push(chars); }
32
33 var popArrs = [];
34 for (var i=0; i<mult; i++) { popArrs.push(arr.slice()); }
35
36
37 for(var a=0;a<mult;a++) {
38 var x; while (x = popArrs[a].pop()) { }
39 }
40
41 }
42 catch(ex)
43 {
44 actual = ex + '';
45 }
46
47 reportCompare(expect, actual, summary);
48 }