js/src/jit-test/tests/baseline/bug836742.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 // Ensure the correct frame is passed to exception unwind hooks.
     3 var g = newGlobal();
     4 g.debuggeeGlobal = this;
     5 g.eval("(" + function () {
     6     frames = [];
     7     var dbg = Debugger(debuggeeGlobal);
     8     dbg.onEnterFrame = function(frame) {
     9 	frames.push(frame);
    10     };
    11     dbg.onExceptionUnwind = function(frame) {
    12 	assertEq(frames.indexOf(frame), frames.length - 1);
    13 	frames.pop();
    14 	assertEq(frame, dbg.getNewestFrame());
    15     }
    16 } + ")()");
    18 function f(n) {
    19     debugger;
    20     n--;
    21     if (n > 0) {
    22         f(n);
    23     } else {
    24 	assertEq(g.frames.length, 10);
    25         throw "fit";
    26     }
    27 }
    28 try {
    29     f(10);
    30     assertEq(0, 1);
    31 } catch (e) {
    32     assertEq(e, "fit");
    33 }
    34 assertEq(g.frames.length, 0);

mercurial