js/src/jit-test/tests/debug/Debugger-debuggees-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 // |jit-test| debug
     2 // Don't allow cycles in the graph of the compartment "debugs" relation.
     4 load(libdir + "asserts.js");
     6 // trivial cycles
     7 var dbg = new Debugger;
     8 assertThrowsInstanceOf(function () { dbg.addDebuggee(this); }, TypeError);
     9 assertThrowsInstanceOf(function () { new Debugger(this); }, TypeError);
    11 // cycles of length 2
    12 var d1 = newGlobal();
    13 d1.top = this;
    14 d1.eval("var dbg = new Debugger(top)");
    15 assertThrowsInstanceOf(function () { dbg.addDebuggee(d1); }, TypeError);
    16 assertThrowsInstanceOf(function () { new Debugger(d1); }, TypeError);
    18 // cycles of length 3
    19 var d2 = newGlobal();
    20 d2.top = this;
    21 d2.eval("var dbg = new Debugger(top.d1)");
    22 assertThrowsInstanceOf(function () { dbg.addDebuggee(d2); }, TypeError);
    23 assertThrowsInstanceOf(function () { new Debugger(d2); }, TypeError);

mercurial