Bug 704259: part 2, don't set cx->generatingError in JS_ReportPendingException, r=luke

This commit is contained in:
David Mandelin 2012-03-06 18:49:05 -08:00
parent f4f11fbe7f
commit 1165a003f2

View File

@ -6467,23 +6467,10 @@ JS_ClearPendingException(JSContext *cx)
JS_PUBLIC_API(JSBool)
JS_ReportPendingException(JSContext *cx)
{
JSBool ok;
bool save;
AssertNoGC(cx);
CHECK_REQUEST(cx);
/*
* Set cx->generatingError to suppress the standard error-to-exception
* conversion done by all {js,JS}_Report* functions except for OOM. The
* cx->generatingError flag was added to suppress recursive divergence
* under js_ErrorToException, but it serves for our purposes here too.
*/
save = cx->generatingError;
cx->generatingError = JS_TRUE;
ok = js_ReportUncaughtException(cx);
cx->generatingError = save;
return ok;
return js_ReportUncaughtException(cx);
}
struct JSExceptionState {