Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 // |jit-test| debug
2 // frame properties throw if !frame.live
4 load(libdir + "asserts.js");
6 var g = newGlobal();
7 var f;
8 Debugger(g).onDebuggerStatement = function (frame) {
9 assertEq(frame.live, true);
10 assertEq(frame.type, "call");
11 assertEq(frame.this instanceof Object, true);
12 assertEq(frame.older instanceof Debugger.Frame, true);
13 assertEq(frame.callee instanceof Debugger.Object, true);
14 assertEq(frame.generator, false);
15 assertEq(frame.constructing, false);
16 assertEq(frame.arguments.length, 0);
17 f = frame;
18 };
20 g.eval("(function () { debugger; }).call({});");
21 assertEq(f.live, false);
22 assertThrowsInstanceOf(function () { f.type; }, Error);
23 assertThrowsInstanceOf(function () { f.this; }, Error);
24 assertThrowsInstanceOf(function () { f.older; }, Error);
25 assertThrowsInstanceOf(function () { f.callee; }, Error);
26 assertThrowsInstanceOf(function () { f.generator; }, Error);
27 assertThrowsInstanceOf(function () { f.constructing; }, Error);
28 assertThrowsInstanceOf(function () { f.arguments; }, Error);