Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | // |jit-test| error: TypeError |
michael@0 | 2 | function start() { |
michael@0 | 3 | MAX_TOTAL_TIME = startTime = new Date |
michael@0 | 4 | do { |
michael@0 | 5 | if (rnd(0)) return (a[rnd()])() |
michael@0 | 6 | lastTime = new Date |
michael@0 | 7 | } while ( lastTime - startTime < MAX_TOTAL_TIME ) |
michael@0 | 8 | } |
michael@0 | 9 | function MersenneTwister19937() { |
michael@0 | 10 | this.init_genrand = function() { |
michael@0 | 11 | for (mti = 1; mti < 4; mti++) { |
michael@0 | 12 | Array[mti] = 1 |
michael@0 | 13 | } |
michael@0 | 14 | }; |
michael@0 | 15 | this.genrand_int32_t = function() { |
michael@0 | 16 | if (mti > 4) { |
michael@0 | 17 | mti = 0 |
michael@0 | 18 | } |
michael@0 | 19 | return Array[mti++]; |
michael@0 | 20 | } |
michael@0 | 21 | } (function() { |
michael@0 | 22 | fuzzMT = new MersenneTwister19937; |
michael@0 | 23 | fuzzMT.init_genrand() |
michael@0 | 24 | rnd = function() { |
michael@0 | 25 | return Math.floor(fuzzMT.genrand_int32()) |
michael@0 | 26 | } |
michael@0 | 27 | } ()) |
michael@0 | 28 | function weighted(wa) { |
michael@0 | 29 | a = [] |
michael@0 | 30 | for (i = 0; i < wa.length; ++i) { |
michael@0 | 31 | for (var j = 0; j < 8; ++j) { |
michael@0 | 32 | a.push(wa[i].fun) |
michael@0 | 33 | } |
michael@0 | 34 | } |
michael@0 | 35 | } |
michael@0 | 36 | statementMakers = weighted([{ |
michael@0 | 37 | fun: function makeMixedTypeArray() { [[, , , , , , , , , , , , , , , , , , , |
michael@0 | 38 | , , , , , ""][(a[rnd()])()]]} |
michael@0 | 39 | }]) |
michael@0 | 40 | start() |
michael@0 | 41 | |
michael@0 | 42 | /* Don't assert. */ |
michael@0 | 43 |