mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 580128 - Use compartments instead of global objects to see if we should use slim wrappers. r=peterv
This commit is contained in:
parent
bdb04e3dcc
commit
948fa12cc4
@ -1193,8 +1193,8 @@ XPCConvert::NativeInterface2JSObject(XPCLazyCallContext& lccx,
|
||||
}
|
||||
else if(IS_SLIM_WRAPPER_OBJECT(flat))
|
||||
{
|
||||
JSObject* global = JS_GetGlobalForObject(cx, flat);
|
||||
if(global == xpcscope->GetGlobalJSObject())
|
||||
if(flat->getCompartment(cx) ==
|
||||
xpcscope->GetGlobalJSObject()->getCompartment(cx))
|
||||
{
|
||||
*d = OBJECT_TO_JSVAL(flat);
|
||||
return JS_TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user