js/src/jit-test/tests/debug/Debugger-onEnterFrame-resumption-02.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 // If debugger.onEnterFrame returns {throw:val}, an exception is thrown in the debuggee.
     3 load(libdir + "asserts.js");
     5 var g = newGlobal();
     6 g.set = false;
     7 g.eval("function f() {\n" +
     8        "    set = true;\n" +
     9        "    return 'fail';\n" +
    10        "}\n");
    12 var dbg = Debugger(g);
    13 var savedFrame;
    14 dbg.onEnterFrame = function (frame) {
    15     savedFrame = frame;
    16     return {throw: "pass"};
    17 };
    19 savedFrame = undefined;
    20 assertThrowsValue(g.f, "pass");
    21 assertEq(savedFrame.live, false);
    22 assertEq(g.set, false);
    24 savedFrame = undefined;
    25 assertThrowsValue(function () { new g.f; }, "pass");
    26 assertEq(savedFrame.live, false);
    27 assertEq(g.set, false);

mercurial