michael@0: function testBug502914() { michael@0: // Assigning a non-function to a function-valued property on trace should michael@0: // bump the shape. michael@0: function f1() {} michael@0: function C() {} michael@0: var x = C.prototype = {m: f1}; michael@0: x.m(); // brand scope michael@0: var arr = [new C, new C, new C, x]; michael@0: try { michael@0: for (var i = 0; i < 4; i++) { michael@0: arr[i].m = 12; michael@0: x.m(); // should throw last time through michael@0: } michael@0: } catch (exc) { michael@0: return exc.constructor.name; michael@0: } michael@0: return "no exception"; michael@0: } michael@0: assertEq(testBug502914(), "TypeError");