mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
Bug 704259: part 2, don't set cx->generatingError in JS_ReportPendingException, r=luke
This commit is contained in:
parent
f4f11fbe7f
commit
1165a003f2
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user