зеркало из https://github.com/mozilla/pjs.git
Fixing Bug 9976.
This commit is contained in:
Родитель
ea83b0e8a2
Коммит
460e5354c1
|
@ -176,6 +176,20 @@ typedef PRUint32 nsresult;
|
|||
/* Returned when a factory already is registered */
|
||||
#define NS_ERROR_FACTORY_EXISTS (NS_ERROR_BASE + 0x100)
|
||||
|
||||
|
||||
/* Returned when a proxy could not be create a proxy for one of the IN parameters
|
||||
This is returned only when the "real" meathod has NOT been invoked.
|
||||
*/
|
||||
|
||||
#define NS_ERROR_PROXY_INVALID_IN_PARAMETER ((nsresult) 0x80010010L)
|
||||
|
||||
/* Returned when a proxy could not be create a proxy for one of the OUT parameters
|
||||
This is returned only when the "real" meathod has ALREADY been invoked.
|
||||
*/
|
||||
|
||||
#define NS_ERROR_PROXY_INVALID_OUT_PARAMETER ((nsresult) 0x80010011L)
|
||||
|
||||
|
||||
/*@}*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -95,7 +95,7 @@ class nsProxyObject : public nsISupports
|
|||
|
||||
} AutoProxyConvertTypes;
|
||||
|
||||
void AutoProxyParameterList(nsXPTMethodInfo *methodInfo, nsXPTCMiniVariant * params,
|
||||
nsresult AutoProxyParameterList(nsXPTMethodInfo *methodInfo, nsXPTCMiniVariant * params,
|
||||
nsIInterfaceInfo *interfaceInfo, AutoProxyConvertTypes convertType);
|
||||
|
||||
nsIEventQueue *mDestQueue; /* destination queue */
|
||||
|
|
|
@ -144,9 +144,11 @@ nsProxyObject::Post( PRUint32 methodIndex, nsXPTMethodInfo *methodInfo, nsXPTCMi
|
|||
///////////////////////////////////////////////////////////////////////
|
||||
// Auto-proxification
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
AutoProxyParameterList(methodInfo, params, interfaceInfo, convertInParameters);
|
||||
nsresult rv = AutoProxyParameterList(methodInfo, params, interfaceInfo, convertInParameters);
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
// convert the nsXPTCMiniVariant to a nsXPTCVariant
|
||||
|
||||
|
@ -187,13 +189,13 @@ nsProxyObject::Post( PRUint32 methodIndex, nsXPTMethodInfo *methodInfo, nsXPTCMi
|
|||
{
|
||||
mDestQueue->PostSynchronousEvent(event, nsnull);
|
||||
|
||||
nsresult rv = proxyInfo->GetResult();
|
||||
rv = proxyInfo->GetResult();
|
||||
delete proxyInfo;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// Auto-proxification
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
AutoProxyParameterList(methodInfo, params, interfaceInfo, convertOutParameters);
|
||||
rv = AutoProxyParameterList(methodInfo, params, interfaceInfo, convertOutParameters);
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
mDestQueue->ExitMonitor();
|
||||
|
@ -212,7 +214,7 @@ nsProxyObject::Post( PRUint32 methodIndex, nsXPTMethodInfo *methodInfo, nsXPTCMi
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
nsresult
|
||||
nsProxyObject::AutoProxyParameterList(nsXPTMethodInfo *methodInfo, nsXPTCMiniVariant * params,
|
||||
nsIInterfaceInfo *interfaceInfo, AutoProxyConvertTypes convertType)
|
||||
{
|
||||
|
@ -262,20 +264,27 @@ nsProxyObject::AutoProxyParameterList(nsXPTMethodInfo *methodInfo, nsXPTCMiniVar
|
|||
|
||||
interfaceInfo->GetIIDForParam(¶mInfo, &iid);
|
||||
|
||||
manager->GetProxyObject( GetQueue(),
|
||||
rv = manager->GetProxyObject(GetQueue(),
|
||||
*iid,
|
||||
anInterface,
|
||||
GetProxyType(),
|
||||
(void**) &aProxyObject);
|
||||
|
||||
nsAllocator::Free((void*)iid);
|
||||
NS_RELEASE(manager);
|
||||
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
if (paramInfo.IsOut())
|
||||
*((void**)params[i].val.p) = ((void*)aProxyObject);
|
||||
else
|
||||
(params[i].val.p) = ((void*)aProxyObject);
|
||||
|
||||
NS_RELEASE(manager);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Could not get nsIProxyObjectManager
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче