js/src/jit-test/tests/baseline/bug842431-3.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|
     3 // If an exception unwind hook performs a forced return, and this calls an
     4 // onPop handler that throws, the exception should not be handled in the
     5 // current frame but propagated to the caller.
     6 var g = newGlobal();
     7 var dbg = new Debugger(g);
     9 g.eval('function f() { try { var y; throw 123; } catch(e) { assertEq(0, 1); } }');
    11 dbg.onExceptionUnwind = function(frame) {
    12     frame.onPop = function() {
    13 	return {throw: 321};
    14     }
    16     return {return: 11};
    17 };
    19 try {
    20     g.f();
    21     assertEq(0, 1);
    22 } catch(e) {
    23     assertEq(e.toString().contains("321"), true);
    24 }

mercurial