Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 // Some testing for JSOP_NEW.
2 function foo(prop) {
3 this.name = "Foo";
4 this.prop = prop;
5 return this;
6 }
8 // Construct an object with a unique assignation to a property.
9 function f(i) {
10 var x = new foo(i);
11 return x.prop;
12 }
14 // Assert that a unique object really was created.
15 for (var i = 0; i < 100; i++)
16 assertEq(f(i), i);