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.
2 // aaa is initially undefined. Make sure it's set to the
3 // correct value - we have to store the type tag, even though
4 // its known type is int32.
5 var aaa;
6 function f() {
7 function g(x) {
8 if (x)
9 aaa = 22;
10 }
11 g(10);
13 function h() {
14 aaa = 22;
15 }
16 for (var i=0; i<70; i++) {
17 h();
18 }
19 assertEq(aaa, 22);
20 }
21 f();
23 x = 0;
24 function setX(i) {
25 x = i;
26 }
27 for (var i=0; i<70; i++)
28 setX(i);
29 assertEq(x, 69);
31 y = 3.14;
32 y = true;
33 y = [];
34 function setY(arg) {
35 y = arg;
36 }
37 for (var i=0; i<70; i++)
38 setY([1]);
39 setY([1, 2, 3]);
40 assertEq(y.length, 3);
42 // z is non-configurable, but can be made non-writable.
43 var z = 10;
45 function testNonWritable() {
46 function g() {
47 z = 11;
48 }
49 for (var i=0; i<70; i++) {
50 g();
51 }
52 Object.defineProperty(this, "z", {value: 1234, writable: false});
53 g();
54 assertEq(z, 1234);
55 }
56 testNonWritable();