js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-11.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 // Resumption values other than |undefined| from uncaughtExceptionHook from
     2 // onNewGlobalObject handlers are ignored (other than cancelling further hooks).
     4 load(libdir + 'asserts.js');
     6 var dbg = new Debugger;
     7 var log;
     9 dbg.onNewGlobalObject = function () {
    10   log += 'n';
    11   throw 'party';
    12 };
    14 dbg.uncaughtExceptionHook = function (ex) {
    15   log += 'u';
    16   assertEq(ex, 'party');
    17   return { throw: 'fit' };
    18 };
    20 log = '';
    21 assertEq(typeof newGlobal(), 'object');
    22 assertEq(log, 'nu');
    24 dbg.uncaughtExceptionHook = function (ex) {
    25   log += 'u';
    26   assertEq(ex, 'party');
    27 };
    29 log = '';
    30 assertEq(typeof newGlobal(), 'object');
    31 assertEq(log, 'nu');

mercurial