comparison: js/src/jit-test/tests/debug/onExceptionUnwind-resumption-01.js
js/src/jit-test/tests/debug/onExceptionUnwind-resumption-01.js
- branch
- TOR_BUG_3246
- changeset 7
- 129ffea94266
equal
deleted
inserted
replaced
|
1 // Check that an onExceptionUnwind hook can force a frame to return a value early. |
|
2 |
|
3 var g = newGlobal(); |
|
4 var dbg = Debugger(g); |
|
5 dbg.onExceptionUnwind = function (frame, exc) { |
|
6 return { return:"sproon" }; |
|
7 }; |
|
8 g.eval("function f() { throw 'ksnife'; }"); |
|
9 assertEq(g.f(), "sproon"); |