mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix Convert to work for JSTYPE_VOID and make sure it reports an error. bug 394436, r=jst sr=brendan
This commit is contained in:
parent
51598ca325
commit
dbdd20c732
@ -789,9 +789,15 @@ XPC_XOW_Convert(JSContext *cx, JSObject *obj, JSType type, jsval *vp)
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
// Note: JSTYPE_VOID and JSTYPE_STRING are equivalent.
|
||||
nsresult rv = IsWrapperSameOrigin(cx, wrappedObj);
|
||||
if (NS_FAILED(rv) &&
|
||||
(rv != NS_ERROR_DOM_PROP_ACCESS_DENIED || type != JSTYPE_STRING)) {
|
||||
(rv != NS_ERROR_DOM_PROP_ACCESS_DENIED ||
|
||||
(type != JSTYPE_STRING && type != JSTYPE_VOID))) {
|
||||
// Ensure that we report some kind of error.
|
||||
if (rv == NS_ERROR_DOM_PROP_ACCESS_DENIED) {
|
||||
ThrowException(rv, cx);
|
||||
}
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user