michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: // Contributor: Jason Orendorff michael@0: michael@0: var obj = {a: 0, b: 1, c: 2}; michael@0: delete obj.b; // switch to dictionary mode michael@0: Object.defineProperty(obj, 'g', michael@0: {get: function () { return -1; }, configurable: true}); michael@0: for (var i = 3; i < 20; i++) michael@0: obj['x' + i] = i; // get property table michael@0: for (var i = 3; i < 20; i++) michael@0: delete obj['x' + i]; // add to freelist michael@0: delete obj.g; // must update lastProp->freeslot, to avoid assertion michael@0: michael@0: // extra junk to try to hit the assertion, if freeslot is not updated michael@0: gc(); michael@0: obj.d = 3; michael@0: obj.e = 4; michael@0: michael@0: reportCompare(0, 0, 'ok');