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 function f(arr, i, v)
2 {
3 arr[i] = v;
4 }
6 function test()
7 {
8 // Use a much-greater capacity than the eventual non-writable length.
9 var a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
10 Object.defineProperty(a, "length", { writable: false, value: 6 });
12 for (var i = 0; i < 100; i++)
13 f(a, a.length, i);
15 assertEq(a.hasOwnProperty(6), false);
16 assertEq(a[6], undefined);
17 assertEq(a.length, 6);
18 }
20 test();