diff --git a/js/src/jsexn.c b/js/src/jsexn.c index 94e079a4021..5701dc2f8e2 100644 --- a/js/src/jsexn.c +++ b/js/src/jsexn.c @@ -1353,7 +1353,11 @@ js_ReportUncaughtException(JSContext *cx) } else { /* Flag the error as an exception. */ reportp->flags |= JSREPORT_EXCEPTION; + + /* Pass the exception object. */ + JS_SetPendingException(cx, exn); js_ReportErrorAgain(cx, bytes, reportp); + JS_ClearPendingException(cx); } out: