js/src/jit-test/tests/debug/Frame-onPop-05.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 var g = newGlobal();
     2 var dbg = new Debugger(g);
     3 g.debuggerGlobal = this;
     4 var log;
     6 dbg.onEnterFrame = function handleEnter(f) {
     7     log += '(';
     8     f.onPop = function handlePop(c) {
     9         log += ')';
    10         assertEq(c.throw, "election");
    11     };
    12 };
    13 dbg.onExceptionUnwind = function handleExceptionUnwind(f, x) {
    14     log += 'u';
    15     assertEq(x, "election");
    16 };
    18 log = '';
    19 try {
    20     g.eval("try { throw 'election'; } finally { debuggerGlobal.log += 'f'; }");
    21 } catch (x) {
    22     log += 'c';
    23     assertEq(x, 'election');
    24 }
    25 assertEq(log, '(ufu)c');

mercurial