michael@0: // Check that if an onExceptionUnwind hook forces a constructor frame to michael@0: // return a primitive value, it still gets wrapped up in an object. michael@0: michael@0: var g = newGlobal(); michael@0: var dbg = Debugger(g); michael@0: dbg.onExceptionUnwind = function (frame, exc) { michael@0: return { return:"sproon" }; michael@0: }; michael@0: g.eval("function f() { throw 'ksnife'; }"); michael@0: assertEq(typeof new g.f, "object");