blob: 053f00928e651430cbbe341aae1f31e10fd19ebb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
g = newGlobal({newCompartment: true})
g.parent = this
g.eval("new Debugger(parent).onExceptionUnwind = function () {}")
enableGeckoProfiling()
try {
// Only the ARM simulator supports single step profiling.
enableSingleStepProfiling();
} catch (e) {
quit();
}
function assertThrowsInstanceOf(f) {
try {
f()
} catch (exc) {}
}
function testThrow(thunk) {
for (i = 0; i < 20; i++) {
iter = thunk()
assertThrowsInstanceOf(function() { return iter.throw(); })
}
}
testThrow(function*() {})
|