diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/basic/testBug502914.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/basic/testBug502914.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,19 @@ +function testBug502914() { + // Assigning a non-function to a function-valued property on trace should + // bump the shape. + function f1() {} + function C() {} + var x = C.prototype = {m: f1}; + x.m(); // brand scope + var arr = [new C, new C, new C, x]; + try { + for (var i = 0; i < 4; i++) { + arr[i].m = 12; + x.m(); // should throw last time through + } + } catch (exc) { + return exc.constructor.name; + } + return "no exception"; +} +assertEq(testBug502914(), "TypeError");