1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/jaeger/propertyOptimize-2.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,16 @@ 1.4 + 1.5 +function Foo(x) 1.6 +{ 1.7 + this.f = x + 10; 1.8 +} 1.9 + 1.10 +var x = new Foo(0); 1.11 +assertEq(10, eval("x.f")); 1.12 + 1.13 +called = false; 1.14 +Object.defineProperty(Foo.prototype, 'f', {set: function() { called = true; }}); 1.15 + 1.16 +var y = new Foo(0); 1.17 +assertEq(10, eval("x.f")); 1.18 +assertEq(undefined, eval("y.f")); 1.19 +assertEq(called, true);