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| debug |
michael@0 | 2 | setDebug(true); |
michael@0 | 3 | |
michael@0 | 4 | // bug 657975 |
michael@0 | 5 | function f1(){ "use strict"; options('strict'); } |
michael@0 | 6 | trap(f1, 0, '') |
michael@0 | 7 | f1() |
michael@0 | 8 | |
michael@0 | 9 | // bug 657979 |
michael@0 | 10 | function f2(){ with({a:0}){}; } |
michael@0 | 11 | trap(f2, 0, '') |
michael@0 | 12 | f2() |
michael@0 | 13 | |
michael@0 | 14 | x = 0; |
michael@0 | 15 | |
michael@0 | 16 | // bug 657984 #1 |
michael@0 | 17 | function f3(){ for(y in x); } |
michael@0 | 18 | trap(f3, 5, '') |
michael@0 | 19 | f3() |
michael@0 | 20 | |
michael@0 | 21 | // bug 657984 #2 |
michael@0 | 22 | function f4(){ for(y in x); } |
michael@0 | 23 | trap(f4, 8, '') |
michael@0 | 24 | f4() |
michael@0 | 25 | |
michael@0 | 26 | // bug 658464 |
michael@0 | 27 | function f5() { |
michael@0 | 28 | for ([, x] in 0) {} |
michael@0 | 29 | } |
michael@0 | 30 | trap(f5, 7, '') |
michael@0 | 31 | f5() |
michael@0 | 32 | |
michael@0 | 33 | // bug 658465 |
michael@0 | 34 | function f6() { |
michael@0 | 35 | "use strict"; |
michael@0 | 36 | print(Math.min(0, 1)); |
michael@0 | 37 | } |
michael@0 | 38 | trap(f6, 10, '') |
michael@0 | 39 | f6() |
michael@0 | 40 | |
michael@0 | 41 | // bug 658491 |
michael@0 | 42 | function f7() { |
michael@0 | 43 | try { y = w; } catch(y) {} |
michael@0 | 44 | } |
michael@0 | 45 | trap(f7, 14, '') |
michael@0 | 46 | f7() |
michael@0 | 47 | |
michael@0 | 48 | // bug 658950 |
michael@0 | 49 | f8 = (function() { |
michael@0 | 50 | let x; |
michael@0 | 51 | yield |
michael@0 | 52 | }) |
michael@0 | 53 | trap(f8, 6, undefined); |
michael@0 | 54 | for (a in f8()) |
michael@0 | 55 | (function() {})() |
michael@0 | 56 | |
michael@0 | 57 | // bug 659043 |
michael@0 | 58 | f9 = (function() { |
michael@0 | 59 | for (let a = 0; a < 0; ++a) { |
michael@0 | 60 | for each(let w in []) {} |
michael@0 | 61 | } |
michael@0 | 62 | }) |
michael@0 | 63 | trap(f9, 23, undefined); |
michael@0 | 64 | for (b in f9()) |
michael@0 | 65 | (function() {})() |
michael@0 | 66 | |
michael@0 | 67 | // bug 659233 |
michael@0 | 68 | f10 = (function() { |
michael@0 | 69 | while (h) { |
michael@0 | 70 | continue |
michael@0 | 71 | } |
michael@0 | 72 | }) |
michael@0 | 73 | trap(f10, 0, ''); |
michael@0 | 74 | try { f10() } catch (e) {} |
michael@0 | 75 | |
michael@0 | 76 | // bug 659337 |
michael@0 | 77 | f11 = Function("for (x = 0; x < 6; x++) { gc() }"); |
michael@0 | 78 | trap(f11, 23, ''); |
michael@0 | 79 | f11() |