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 | function add(a, b, k) { |
michael@0 | 2 | var result = a + b; |
michael@0 | 3 | return k(result); |
michael@0 | 4 | } |
michael@0 | 5 | |
michael@0 | 6 | function sub(a, b, k) { |
michael@0 | 7 | var result = a - b; |
michael@0 | 8 | return k(result); |
michael@0 | 9 | } |
michael@0 | 10 | |
michael@0 | 11 | function mul(a, b, k) { |
michael@0 | 12 | var result = a * b; |
michael@0 | 13 | return k(result); |
michael@0 | 14 | } |
michael@0 | 15 | |
michael@0 | 16 | function div(a, b, k) { |
michael@0 | 17 | var result = a / b; |
michael@0 | 18 | return k(result); |
michael@0 | 19 | } |
michael@0 | 20 | |
michael@0 | 21 | function arithmetic() { |
michael@0 | 22 | add(4, 4, function (a) { |
michael@0 | 23 | // 8 |
michael@0 | 24 | sub(a, 2, function (b) { |
michael@0 | 25 | // 6 |
michael@0 | 26 | mul(b, 3, function (c) { |
michael@0 | 27 | // 18 |
michael@0 | 28 | div(c, 2, function (d) { |
michael@0 | 29 | // 9 |
michael@0 | 30 | console.log(d); |
michael@0 | 31 | }); |
michael@0 | 32 | }); |
michael@0 | 33 | }); |
michael@0 | 34 | }); |
michael@0 | 35 | } |
michael@0 | 36 | |
michael@0 | 37 | // Compile with closure compiler and the following flags: |
michael@0 | 38 | // |
michael@0 | 39 | // --compilation_level WHITESPACE_ONLY |
michael@0 | 40 | // --source_map_format V3 |
michael@0 | 41 | // --create_source_map code_math.map |
michael@0 | 42 | // --js_output_file code_math.min.js |
michael@0 | 43 | // |
michael@0 | 44 | // And then append the sourceMappingURL comment directive to code_math.min.js |
michael@0 | 45 | // manually. |