js/src/jit-test/tests/ion/bug825705.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 // Test 1: When constructing x, we shouldn't take the prototype for this.
     2 // it will crash if that happens
     3 evalcx("\
     4     var x = newGlobal().Object;\
     5     function f() { return new x; }\
     6     f();\
     7     f();\
     8 ", newGlobal());
    10 // Test 2: Don't take the prototype of proxy's to create |this|,
    11 // as this will throw... Not expected behaviour.
    12 var O = new Proxy(function() {}, {
    13     get: function() {
    14 	    throw "get trap";
    15     }
    16 });
    18 function f() {
    19   new O();
    20 }
    22 f();
    23 f();

mercurial