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 | // Binary: cache/js-dbg-64-67bf9a4a1f77-linux |
michael@0 | 2 | // Flags: --ion-eager |
michael@0 | 3 | // |
michael@0 | 4 | var callStack = new Array(); |
michael@0 | 5 | var gTestcases = new Array(); |
michael@0 | 6 | var gTc = gTestcases.length; |
michael@0 | 7 | function TestCase(n, d, e, a) { |
michael@0 | 8 | this.expect = e; |
michael@0 | 9 | this.actual = a; |
michael@0 | 10 | this.passed = getTestCaseResult(e, a); |
michael@0 | 11 | this.reason = ''; |
michael@0 | 12 | this.bugnumber = typeof(BUGNUMER) != 'undefined' ? BUGNUMBER : ''; |
michael@0 | 13 | this.type = (typeof window == 'undefined' ? 'shell' : 'browser'); |
michael@0 | 14 | gTestcases[gTc++] = this; |
michael@0 | 15 | } |
michael@0 | 16 | function reportCompare (expected, actual, description) { |
michael@0 | 17 | var output = ""; |
michael@0 | 18 | if (typeof description == "undefined") |
michael@0 | 19 | if (expected != actual) |
michael@0 | 20 | printStatus ("Expected value '" + toPrinted(expected) + |
michael@0 | 21 | "' matched actual value '" + toPrinted(actual) + "'"); |
michael@0 | 22 | var testcase = new TestCase("unknown-test-name", description, expected, actual); |
michael@0 | 23 | testcase.reason = output; |
michael@0 | 24 | if (testcase.passed) { } |
michael@0 | 25 | return testcase.passed; |
michael@0 | 26 | } |
michael@0 | 27 | function enterFunc (funcName) { |
michael@0 | 28 | var lastFunc = callStack.pop(); |
michael@0 | 29 | reportCompare(funcName, lastFunc, "Test driver failure wrong exit function "); |
michael@0 | 30 | } |
michael@0 | 31 | function getTestCaseResult(expected, actual) |
michael@0 | 32 | function getFailedCases() { |
michael@0 | 33 | for ( var i = 0; i < gTestcases.length; i++ ) {} |
michael@0 | 34 | }; |
michael@0 | 35 | function jit(on) {} |
michael@0 | 36 | var lfcode = new Array(); |
michael@0 | 37 | lfcode.push("\ |
michael@0 | 38 | var summary = 'decompilation of \"let with with\" ';\ |
michael@0 | 39 | var actual = '';\ |
michael@0 | 40 | var expect = '';\ |
michael@0 | 41 | test();\ |
michael@0 | 42 | function test() {\ |
michael@0 | 43 | enterFunc ('test');\ |
michael@0 | 44 | gczeal(2);\ |
michael@0 | 45 | for (let q = 0; q < 50; ++q) {\ |
michael@0 | 46 | new Function('for (var i = 0; i < 5; ++i) { } ')();\ |
michael@0 | 47 | var w = 'r'.match(/r/);\ |
michael@0 | 48 | new Function('for (var j = 0; j < 1; ++j) { } ')();\ |
michael@0 | 49 | }\ |
michael@0 | 50 | jit(('Math.log'));\ |
michael@0 | 51 | reportCompare(expect, actual, summary);\ |
michael@0 | 52 | }\ |
michael@0 | 53 | "); |
michael@0 | 54 | delete Debugger; |
michael@0 | 55 | while (true) { |
michael@0 | 56 | var file = lfcode.shift(); if (file == undefined) { break; } |
michael@0 | 57 | if (file == "evaluate") { |
michael@0 | 58 | } else { |
michael@0 | 59 | loadFile(file); |
michael@0 | 60 | } |
michael@0 | 61 | } |
michael@0 | 62 | function loadFile(lfVarx) { |
michael@0 | 63 | try { |
michael@0 | 64 | if (lfVarx.substr(-3) == ".js") { |
michael@0 | 65 | } else { |
michael@0 | 66 | evaluate(lfVarx); |
michael@0 | 67 | } |
michael@0 | 68 | } catch (lfVare) { |
michael@0 | 69 | } |
michael@0 | 70 | } |