Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
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);