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.
1 // Try to test that we handle shape regeneration correctly.
2 // This is a fragile test, but as of this writing, on dmandelin's
3 // windows box, we have the same shape number with different
4 // logical shapes in the two assertEq lines.
6 var o;
7 var p;
8 var zz;
9 var o2;
11 function f(x) {
12 return x.a;
13 }
15 gczeal(1);
16 gc();
18 zz = { q: 11 };
19 o = { a: 77, b: 88 };
20 o2 = { c: 11 };
21 p = { b: 99, a: 11 };
23 //print('s ' + shapeOf(zz) + ' ' + shapeOf(o) + ' ' + shapeOf(o2) + ' ' + shapeOf(p));
25 assertEq(f(o), 77);
27 o = undefined;
29 gczeal(1);
30 gc();
31 //print('s ' + 'x' + ' ' + shapeOf(p));
33 assertEq(f(p), 11);