Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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();