Debian Codegraph @

js/src/jit-test/tests/profiler/bug1261324.js

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