mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 887334 - Don't rethrow in quickstubs if there's already an exception pending. r=luke
This commit is contained in:
parent
72a7f93f19
commit
3c5aaefdba
@ -218,13 +218,13 @@ ThrowCallFailed(JSContext *cx, nsresult rv,
|
||||
const char* format;
|
||||
const char* name;
|
||||
|
||||
/*
|
||||
* If there is a pending exception when the native call returns and
|
||||
* it has the same error result as returned by the native call, then
|
||||
* the native call may be passing through an error from a previous JS
|
||||
* call. So we'll just throw that exception into our JS.
|
||||
*/
|
||||
if (XPCThrower::CheckForPendingException(rv, cx))
|
||||
// If the cx already has a pending exception, just throw that.
|
||||
//
|
||||
// We used to check here to make sure the exception matched rv (whatever
|
||||
// that means). But this meant that we'd be calling into JSAPI below with
|
||||
// a pending exception, which isn't really kosher. The first exception thrown
|
||||
// should generally take precedence anyway.
|
||||
if (JS_IsExceptionPending(cx))
|
||||
return false;
|
||||
|
||||
// else...
|
||||
|
Loading…
Reference in New Issue
Block a user