1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/debug/onExceptionUnwind-resumption-02.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,10 @@ 1.4 +// Check that if an onExceptionUnwind hook forces a constructor frame to 1.5 +// return a primitive value, it still gets wrapped up in an object. 1.6 + 1.7 +var g = newGlobal(); 1.8 +var dbg = Debugger(g); 1.9 +dbg.onExceptionUnwind = function (frame, exc) { 1.10 + return { return:"sproon" }; 1.11 +}; 1.12 +g.eval("function f() { throw 'ksnife'; }"); 1.13 +assertEq(typeof new g.f, "object");