js/src/jit-test/tests/debug/Object-defineProperty-11.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 // obj.defineProperty works when obj's referent is a wrapper.
     3 var x = {};
     4 var g = newGlobal();
     5 g.x = x;
     6 var dbg = new Debugger;
     7 var gw = dbg.addDebuggee(g);
     8 var xw = gw.getOwnPropertyDescriptor("x").value;
     9 xw.defineProperty("p", {configurable: true, enumerable: true, writable: true, value: gw});
    10 assertEq(x.p, g);
    12 var desc = Object.getOwnPropertyDescriptor(x, "p");
    13 assertEq(desc.configurable, true);
    14 assertEq(desc.enumerable, true);
    15 assertEq(desc.writable, true);
    16 assertEq(desc.value, g);

mercurial