mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out jst's patch from bug 407819 to see if it fixes qm-centos5-01's mochitest failures.
This commit is contained in:
parent
867dfb80ed
commit
f09f67bea1
@ -251,11 +251,6 @@ extern const char XPC_XPCONNECT_CONTRACTID[];
|
||||
*dest = result; \
|
||||
return (result || !src) ? NS_OK : NS_ERROR_OUT_OF_MEMORY
|
||||
|
||||
#define IS_WRAPPER_CLASS(clazz) \
|
||||
((clazz) == &XPC_WN_NoHelper_JSClass.base || \
|
||||
(clazz)->getObjectOps == XPC_WN_GetObjectOpsNoCall || \
|
||||
(clazz)->getObjectOps == XPC_WN_GetObjectOpsWithCall)
|
||||
|
||||
/***************************************************************************/
|
||||
// Auto locking support class...
|
||||
|
||||
|
@ -1252,6 +1252,11 @@ XPCWrappedNative::ReparentWrapperIfFound(XPCCallContext& ccx,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#define IS_WRAPPER_CLASS(clazz) \
|
||||
((clazz) == &XPC_WN_NoHelper_JSClass.base || \
|
||||
(clazz)->getObjectOps == XPC_WN_GetObjectOpsNoCall || \
|
||||
(clazz)->getObjectOps == XPC_WN_GetObjectOpsWithCall)
|
||||
|
||||
#define IS_TEAROFF_CLASS(clazz) \
|
||||
((clazz) == &XPC_WN_Tearoff_JSClass)
|
||||
|
||||
|
@ -631,35 +631,22 @@ GetScopeOfObject(JSContext* cx, JSObject* obj)
|
||||
nsISupports* supports;
|
||||
JSClass* clazz = JS_GET_CLASS(cx, obj);
|
||||
|
||||
if(!IS_WRAPPER_CLASS(clazz) ||
|
||||
if(!clazz ||
|
||||
!(clazz->flags & JSCLASS_HAS_PRIVATE) ||
|
||||
!(clazz->flags & JSCLASS_PRIVATE_IS_NSISUPPORTS) ||
|
||||
!(supports = (nsISupports*) JS_GetPrivate(cx, obj)))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
{
|
||||
if(clazz->flags & JSCLASS_HAS_PRIVATE &&
|
||||
clazz->flags & JSCLASS_PRIVATE_IS_NSISUPPORTS)
|
||||
{
|
||||
nsCOMPtr<nsIXPConnectWrappedNative> iface =
|
||||
do_QueryInterface((nsISupports*) JS_GetPrivate(cx, obj));
|
||||
|
||||
NS_ASSERTION(!iface, "Uh, how'd this happen?");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
{
|
||||
nsCOMPtr<nsIXPConnectWrappedNative> iface = do_QueryInterface(supports);
|
||||
|
||||
NS_ASSERTION(iface, "Uh, how'd this happen?");
|
||||
}
|
||||
#endif
|
||||
|
||||
// obj is one of our nsXPConnectWrappedNative objects.
|
||||
if(iface)
|
||||
{
|
||||
// We can fairly safely assume that this is really one of our
|
||||
// nsXPConnectWrappedNative objects. No other component in our
|
||||
// universe should be creating objects that implement the
|
||||
// nsIXPConnectWrappedNative interface!
|
||||
return ((XPCWrappedNative*)supports)->GetScope();
|
||||
}
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user