Bug 1141863 - Followup: Clean up proxy get traps to handle new |this| creation semantics. (rs=Waldo) CLOSED TREE
authorEric Faust <efaustbmo@gmail.com>
Thu, 08 Oct 2015 18:37:16 -0700
changeset 300405 f83a07527af8b00b1849d438282bb99b846f3f7f
parent 300404 40f2d8c486bfdc6201a5bab9131a833d0c60269f
child 300406 fa77b9c41225fbd66e3a0305dd97a1fbaa5d3951
push id5392
push userraliiev@mozilla.com
push dateMon, 14 Dec 2015 20:08:23 +0000
treeherdermozilla-beta@16ce8562a975 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1141863
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1141863 - Followup: Clean up proxy get traps to handle new |this| creation semantics. (rs=Waldo) CLOSED TREE
js/src/jit-test/tests/basic/testProxyConstructors.js
js/src/jit-test/tests/ion/bug825705.js
--- a/js/src/jit-test/tests/basic/testProxyConstructors.js
+++ b/js/src/jit-test/tests/basic/testProxyConstructors.js
@@ -1,17 +1,19 @@
 // |jit-test| error: ExitCleanly
 
-assertEq((new (Proxy.createFunction({},
+var handler = { getPropertyDescriptor() { return undefined; } }
+
+assertEq((new (Proxy.createFunction(handler,
                                     function(){ this.x = 1 },
                                     function(){ this.x = 2 }))).x, 2);
 // proxies can return the callee
-var x = Proxy.createFunction({}, function (q) { return q; });
+var x = Proxy.createFunction(handler, function (q) { return q; });
 assertEq(new x(x), x);
 try {
-    var x = (Proxy.createFunction({}, "".indexOf));
+    var x = (Proxy.createFunction(handler, "".indexOf));
     new x;
     throw "Should not be reached"
 }
 catch (e) {
     assertEq(String(e.message).indexOf('is not a constructor') === -1, false);
 }
 throw "ExitCleanly"
--- a/js/src/jit-test/tests/ion/bug825705.js
+++ b/js/src/jit-test/tests/ion/bug825705.js
@@ -1,23 +1,8 @@
 // Test 1: When constructing x, we shouldn't take the prototype for this.
 // it will crash if that happens
 evalcx("\
     var x = newGlobal().Object;\
     function f() { return new x; }\
     f();\
     f();\
 ", newGlobal());
-
-// Test 2: Don't take the prototype of proxy's to create |this|,
-// as this will throw... Not expected behaviour.
-var O = new Proxy(function() {}, {
-    get: function() {
-	    throw "get trap";
-    }
-});
-
-function f() {
-  new O();
-}
-
-f();
-f();