Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 // Throwing and catching an error in an onStep handler shouldn't interfere
2 // with throwing and catching in the debuggee.
4 var g = newGlobal();
5 g.eval("function f() { debugger; throw 'mud'; }");
7 var dbg = Debugger(g);
8 var stepped = false;
9 dbg.onDebuggerStatement = function (frame) {
10 frame.older.onStep = function () {
11 stepped = true;
12 try {
13 throw 'snow';
14 } catch (x) {
15 assertEq(x, 'snow');
16 }
17 };
18 };
20 stepped = false;
21 g.eval("var caught;\n" +
22 "try {\n" +
23 " f();\n" +
24 "} catch (x) {\n" +
25 " caught = x;\n" +
26 "}\n");
27 assertEq(stepped, true);
28 assertEq(g.caught, 'mud');