diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/jaeger/propertyOptimize-4.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/jaeger/propertyOptimize-4.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,17 @@ +// Make sure new script properties can be invalidated on specialized prototype +// types while they are still being constructed. + +function Foo(a, b, c) { + this.x = a + b; + this.y = c; +} + +updated = false; +var o = {valueOf: function() { + Object.defineProperty(Object.prototype, 'y', {set:function() { updated = true; }}) + }}; + +function Bar() {} +Bar.prototype = new Foo(o, 1, 2); +assertEq(updated, true); +assertEq(Bar.prototype.y, undefined);