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

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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