mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1096341 - require an exception to be set in ToJSValue overload. r=bz
This commit is contained in:
parent
1a25033767
commit
905453b959
@ -66,10 +66,10 @@ ToJSValue(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aValue)
|
||||
{
|
||||
MOZ_ASSERT(aArgument.Failed());
|
||||
ThrowMethodFailedWithDetails(aCx, aArgument, "", "");
|
||||
if (!JS_GetPendingException(aCx, aValue)) {
|
||||
return false;
|
||||
}
|
||||
DebugOnly<bool> throwResult = ThrowMethodFailedWithDetails(aCx, aArgument, "", "");
|
||||
MOZ_ASSERT(!throwResult);
|
||||
DebugOnly<bool> getPendingResult = JS_GetPendingException(aCx, aValue);
|
||||
MOZ_ASSERT(getPendingResult);
|
||||
JS_ClearPendingException(aCx);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user