michael@0: function C() { michael@0: this.m = function () {}; // JSOP_SETMETHOD michael@0: } michael@0: michael@0: var a = [new C, new C, new C, new C, new C, new C, new C, new C, new C]; michael@0: var b = [new C, new C, new C, new C, new C, new C, a[8], new C, new C]; michael@0: michael@0: var thrown = 'none'; michael@0: try { michael@0: for (var i = 0; i < 9; i++) { michael@0: a[i].m(); michael@0: b[i].m = 0.7; // MethodWriteBarrier required here michael@0: } michael@0: } catch (exc) { michael@0: thrown = exc.name; michael@0: } michael@0: assertEq(thrown, 'TypeError');