michael@0: function testBug501690() { michael@0: // Property cache assertion when 3 objects along a prototype chain have the same shape. michael@0: function B(){} michael@0: B.prototype = {x: 123}; michael@0: michael@0: function D(){} michael@0: D.prototype = new B; michael@0: D.prototype.x = 1; // [1] shapeOf(B.prototype) == shapeOf(D.prototype) michael@0: michael@0: arr = [new D, new D, new D, D.prototype]; // [2] all the same shape michael@0: for (var i = 0; i < 4; i++) michael@0: assertEq(arr[i].x, 1); // same kshape [2], same vshape [1] michael@0: } michael@0: testBug501690();