blob: cc34a544888abbb5ed2fce594ccc6569739821b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
var g = newGlobal({newCompartment: true});
g.parent = this;
g.count = 0;
g.eval("(" + function() {
var dbg = new Debugger(parent);
dbg.onEnterFrame = function(frame) {
if (count === 5)
dbg.onEnterFrame = undefined;
count++;
var ex = frame.eval("this").throw.unsafeDereference();
assertEq(ex.message.includes("call super constructor"), true);
}
} + ")()");
class Foo1 {};
class Foo2 extends Foo1 {
constructor() {
super();
}
};
new Foo2();
assertEq(g.count, 6);
|