js/src/jit-test/tests/debug/Frame-onPop-12.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 // Setting an onPop handler from an onPop handler doesn't throw, but the
     2 // new handler doesn't fire.
     3 var g = newGlobal();
     4 var dbg = new Debugger(g);
     5 var log;
     7 dbg.onDebuggerStatement = function handleDebugger(frame) {
     8     log += 'd';
     9     assertEq(frame.type, "eval");
    10     frame.onPop = function firstHandlePop(c) {
    11         log +=')';
    12         assertEq(c.return, 'on investment');
    13         this.onPop = function secondHandlePop(c) {
    14             assertEq("secondHandlePop was called", "secondHandlePop should never be called");
    15         };
    16     };
    17 };
    19 log = "";
    20 g.eval("debugger; 'on investment';");
    21 assertEq(log, 'd)');

mercurial