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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/debug/Frame-onPop-05.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +var g = newGlobal();
     1.5 +var dbg = new Debugger(g);
     1.6 +g.debuggerGlobal = this;
     1.7 +var log;
     1.8 +
     1.9 +dbg.onEnterFrame = function handleEnter(f) {
    1.10 +    log += '(';
    1.11 +    f.onPop = function handlePop(c) {
    1.12 +        log += ')';
    1.13 +        assertEq(c.throw, "election");
    1.14 +    };
    1.15 +};
    1.16 +dbg.onExceptionUnwind = function handleExceptionUnwind(f, x) {
    1.17 +    log += 'u';
    1.18 +    assertEq(x, "election");
    1.19 +};
    1.20 +
    1.21 +log = '';
    1.22 +try {
    1.23 +    g.eval("try { throw 'election'; } finally { debuggerGlobal.log += 'f'; }");
    1.24 +} catch (x) {
    1.25 +    log += 'c';
    1.26 +    assertEq(x, 'election');
    1.27 +}
    1.28 +assertEq(log, '(ufu)c');

mercurial