js/src/jit-test/tests/debug/Frame-eval-19.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 // Eval-in-frame of optimized frames to break out of an infinite loop.
     3 load(libdir + "jitopts.js");
     5 if (!jitTogglesMatch(Opts_IonEagerNoParallelCompilation))
     6   quit(0);
     8 withJitOptions(Opts_IonEagerNoParallelCompilation, function () {
     9   var g = newGlobal();
    10   var dbg = new Debugger;
    12   g.eval("" + function f(d) { g(d); });
    13   g.eval("" + function g(d) { h(d); });
    14   g.eval("" + function h(d) {
    15     var i = 0;
    16     while (d)
    17       interruptIf(d && i++ == 4000);
    18   });
    20   setInterruptCallback(function () {
    21     dbg.addDebuggee(g);
    22     var frame = dbg.getNewestFrame();
    23     if (frame.callee.name != "h" || frame.implementation != "ion")
    24       return true;
    25     frame.eval("d = false;");
    26     return true;
    27   });
    29   g.eval("(" + function () {
    30     for (i = 0; i < 5; i++)
    31       f(false);
    32     f(true);
    33   } + ")();");
    34 });

mercurial