diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/proxy/testDirectProxyConstruct3.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/proxy/testDirectProxyConstruct3.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,15 @@ +// Return the trap result +var proxy = (new Proxy(function (x, y) { + this.foo = x + y; +}, { + construct: function (target, args) { + return { + foo: args[0] * args[1] + }; + } +})); +var obj1 = new proxy(2, 3); +assertEq(obj1.foo, 6); +obj1.bar = proxy; +var obj2 = new obj1.bar(2, 3); +assertEq(obj2.foo, 6);