js/src/jit-test/tests/debug/uncaughtExceptionHook-03.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 // |jit-test| debug; error: ReferenceError
     2 // If uncaughtExceptionHook is absent, the debuggee is terminated.
     4 var g = newGlobal();
     5 g.debuggeeGlobal = this;
     6 g.eval("(" + function () {
     7         var dbg = Debugger(debuggeeGlobal);
     8         dbg.onDebuggerStatement = function (frame) {
     9             if (frame.callee === null) {
    10                 debuggeeGlobal.log += '1';
    11                 var cv = frame.eval("f();");
    12                 debuggeeGlobal.log += '2';
    13                 assertEq(cv, null);
    14             } else {
    15                 assertEq(frame.callee.name, "f");
    16                 debuggeeGlobal.log += '3';
    17                 throw new ReferenceError("oops");
    18             }
    19         };
    20     } + ")();");
    22 function onerror(msg) {
    23 }
    25 var log = '';
    26 debugger;
    27 function f() {
    28     try {
    29         debugger;
    30     } finally {
    31         log += 'x';
    32     }
    33 }
    34 assertEq(log, '132');

mercurial