js/src/jit-test/tests/basic/testMethodWriteBarrier3.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 function g() {}
     3 function h() {
     4     for (var i = 0; i < 9; i++)
     5 	x.f = i;
     6 }
     8 function j() {
     9     x.f();
    10 }
    12 var x = {f: 0.7, g: g};
    13 x.g();  // interpreter brands x
    14 h();
    15 print(shapeOf(x));
    16 x.f = function (){}; // does not change x's shape
    17 j();
    18 print(shapeOf(x));
    19 h(); // should change x's shape
    21 var thrown = 'none';
    22 try {
    23     j(); // should throw since x.f === 8
    24 } catch (exc) {
    25     thrown = exc.name;
    26 }
    27 assertEq(thrown, 'TypeError');

mercurial