js/src/jit-test/tests/debug/Frame-onPop-06.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 // dbg.getNewestFrame in an onPop handler returns the frame being popped.
     2 var g = newGlobal();
     3 g.eval("function f() { debugger; }");
     4 g.eval("function g() { f(); }");
     5 g.eval("function h() { g(); }");
     6 g.eval("function i() { h(); }");
     8 var dbg = new Debugger(g);
     9 var log;
    10 dbg.onEnterFrame = function handleEnter(f) {
    11     log += "(" + f.callee.name;
    12     f.onPop = function handlePop(c) {
    13         log += ")" + f.callee.name;  
    14         assertEq(dbg.getNewestFrame(), this);
    15     };
    16 };
    17 log = '';
    18 g.i();
    19 assertEq(log, "(i(h(g(f)f)g)h)i");

mercurial