js/src/jit-test/tests/pic/proto3.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 // getprop, proto, 3 shapes
     3 var expected = "22,202,202,22,202,202,22,202,202,";
     4 var actual = '';
     6 var protoB = { a: 11, b: 22, c: 33 };
     8 function B() {
     9 }
    10 B.prototype = protoB;
    12 var protoC = { a: 101, b: 202, c: 303 };
    14 function C() {
    15 }
    16 C.prototype = protoC;
    18 function f() {
    19   var o1 = new B();
    20   var o2 = new C();
    21   var o3 = new C();
    22   o3.q = 99;
    23   var oa = [ o1, o2, o3 ];
    25   for (var i = 0; i < 9; ++i) {
    26     actual += oa[i%3].b + ',';
    27   }
    28 }
    30 f();
    32 assertEq(actual, expected);

mercurial