1 // Any copyright is dedicated to the Public Domain.
\r
2 // http://creativecommons.org/licenses/publicdomain/
\r
3 // Contributor: Jason Orendorff <jorendorff@mozilla.com>
\r
5 var obj = {a: 0, b: 1, c: 2};
\r
6 delete obj.b; // switch to dictionary mode
\r
7 Object.defineProperty(obj, 'g',
\r
8 {get: function () { return -1; }, configurable: true});
\r
9 for (var i = 3; i < 20; i++)
\r
10 obj['x' + i] = i; // get property table
\r
11 for (var i = 3; i < 20; i++)
\r
12 delete obj['x' + i]; // add to freelist
\r
13 delete obj.g; // must update lastProp->freeslot, to avoid assertion
\r
15 // extra junk to try to hit the assertion, if freeslot is not updated
\r
20 reportCompare(0, 0, 'ok');
\r