mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 480430 followup -- don't wrap when the scopes are actually the same (even if they don't have principals.
This commit is contained in:
parent
69b42859dd
commit
471bb67580
@ -731,12 +731,14 @@ xpc_NewSystemInheritingJSObject(JSContext *cx, JSClass *clasp, JSObject *proto,
|
||||
inline JSBool
|
||||
xpc_SameOrigin(XPCWrappedNativeScope *objectscope, XPCWrappedNativeScope *xpcscope)
|
||||
{
|
||||
PRBool sameOrigin;
|
||||
if(objectscope == xpcscope)
|
||||
return JS_TRUE;
|
||||
|
||||
nsIPrincipal *objectprincipal = objectscope->GetPrincipal();
|
||||
nsIPrincipal *xpcprincipal = xpcscope->GetPrincipal();
|
||||
if((!objectprincipal || !xpcprincipal) &&
|
||||
(!(sameOrigin = objectscope == xpcscope) ||
|
||||
NS_FAILED(objectprincipal->Equals(xpcprincipal, &sameOrigin))))
|
||||
PRBool sameOrigin;
|
||||
if(!objectprincipal || !xpcprincipal ||
|
||||
NS_FAILED(objectprincipal->Equals(xpcprincipal, &sameOrigin)))
|
||||
{
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user