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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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