js/src/jit-test/tests/debug/onExceptionUnwind-resumption-03.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:a33763bb01b4
1 // Check that an onExceptionUnwind hook can force a frame to throw a different exception.
2
3 load(libdir + "asserts.js");
4
5 var g = newGlobal();
6 var dbg = Debugger(g);
7 dbg.onExceptionUnwind = function (frame, exc) {
8 return { throw:"sproon" };
9 };
10 g.eval("function f() { throw 'ksnife'; }");
11 assertThrowsValue(g.f, "sproon");

mercurial