api change to nsIProxy* interfaces. You can no longer pass in straight PLEventQueues, you now need to pass in nsIEventQueue interfaces (see mozilla/xpcom/threads)
git-svn-id: svn://10.0.0.236/trunk@33830 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -52,8 +52,6 @@ nsProxyObjectCallInfo::~nsProxyObjectCallInfo()
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
NS_IMPL_ISUPPORTS(nsProxyObject, kISupportsIID)
|
||||
|
||||
static NS_DEFINE_IID(kIEventQIID, NS_IEVENTQUEUE_IID);
|
||||
|
||||
nsProxyObject::nsProxyObject()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
@@ -66,7 +64,7 @@ nsProxyObject::nsProxyObject()
|
||||
}
|
||||
|
||||
|
||||
nsProxyObject::nsProxyObject(PLEventQueue *destQueue, ProxyType proxyType, nsISupports *realObject)
|
||||
nsProxyObject::nsProxyObject(nsIEventQueue *destQueue, ProxyType proxyType, nsISupports *realObject)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
NS_ADDREF_THIS();
|
||||
@@ -74,29 +72,23 @@ nsProxyObject::nsProxyObject(PLEventQueue *destQueue, ProxyType proxyType, nsISu
|
||||
mRealObjectOwned = PR_FALSE;
|
||||
mRealObject = realObject;
|
||||
mProxyType = proxyType;
|
||||
mDestQueue = destQueue;
|
||||
|
||||
mRealObject->AddRef();
|
||||
|
||||
nsresult rv = nsComponentManager::CreateInstance(NS_EVENTQUEUE_PROGID,
|
||||
nsnull,
|
||||
kIEventQIID,
|
||||
(void **)&mDestQueue);
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
mDestQueue->InitFromPLQueue(destQueue);
|
||||
}
|
||||
|
||||
NS_ADDREF(mRealObject);
|
||||
NS_ADDREF(mDestQueue);
|
||||
}
|
||||
|
||||
|
||||
nsProxyObject::nsProxyObject(PLEventQueue *destQueue, ProxyType proxyType, const nsCID &aClass, nsISupports *aDelegate, const nsIID &aIID)
|
||||
nsProxyObject::nsProxyObject(nsIEventQueue *destQueue, ProxyType proxyType, const nsCID &aClass, nsISupports *aDelegate, const nsIID &aIID)
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
NS_ADDREF_THIS();
|
||||
|
||||
mRealObjectOwned = PR_TRUE;
|
||||
mProxyType = proxyType;
|
||||
mDestQueue = destQueue;
|
||||
|
||||
NS_ADDREF(mDestQueue);
|
||||
|
||||
nsresult rv = nsComponentManager::CreateInstance(aClass,
|
||||
aDelegate,
|
||||
@@ -108,17 +100,6 @@ nsProxyObject::nsProxyObject(PLEventQueue *destQueue, ProxyType proxyType, const
|
||||
mRealObjectOwned = PR_FALSE;
|
||||
mRealObject = nsnull;
|
||||
}
|
||||
|
||||
rv = nsComponentManager::CreateInstance(NS_EVENTQUEUE_PROGID,
|
||||
nsnull,
|
||||
kIEventQIID,
|
||||
(void **)&mDestQueue);
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
mDestQueue->InitFromPLQueue(destQueue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
nsProxyObject::~nsProxyObject()
|
||||
@@ -130,7 +111,7 @@ nsProxyObject::~nsProxyObject()
|
||||
if(mRealObject != nsnull)
|
||||
{
|
||||
if (!mRealObjectOwned)
|
||||
mRealObject->Release();
|
||||
NS_RELEASE(mRealObject);
|
||||
else
|
||||
NS_RELEASE(mRealObject);
|
||||
}
|
||||
@@ -210,7 +191,7 @@ void DestroyHandler(PLEvent *self)
|
||||
}
|
||||
|
||||
// decrement once since we increased it during the Post()
|
||||
proxyObject->Release();
|
||||
NS_RELEASE(proxyObject);
|
||||
}
|
||||
|
||||
void* EventHandler(PLEvent *self)
|
||||
|
||||
@@ -201,9 +201,7 @@ nsProxyEventClass::CallQueryInterfaceOnProxy(nsProxyEventObject* self, REFNSIID
|
||||
|
||||
if (rv == NS_OK)
|
||||
{
|
||||
PLEventQueue* aEventQueue;
|
||||
|
||||
self->GetQueue()->GetPLEventQueue(&aEventQueue);
|
||||
nsIEventQueue* aEventQueue = self->GetQueue();
|
||||
|
||||
if (aEventQueue != nsnull)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
|
||||
nsProxyEventObject*
|
||||
nsProxyEventObject::GetNewOrUsedProxy(PLEventQueue *destQueue,
|
||||
nsProxyEventObject::GetNewOrUsedProxy(nsIEventQueue *destQueue,
|
||||
ProxyType proxyType,
|
||||
nsISupports *aObj,
|
||||
REFNSIID aIID)
|
||||
@@ -147,7 +147,7 @@ return_wrapper:
|
||||
|
||||
|
||||
|
||||
nsProxyEventObject::nsProxyEventObject(PLEventQueue *destQueue,
|
||||
nsProxyEventObject::nsProxyEventObject(nsIEventQueue *destQueue,
|
||||
ProxyType proxyType,
|
||||
nsISupports* aObj,
|
||||
nsProxyEventClass* aClass,
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
nsXPTCMiniVariant* params);
|
||||
|
||||
|
||||
static nsProxyEventObject* GetNewOrUsedProxy(PLEventQueue *destQueue,
|
||||
static nsProxyEventObject* GetNewOrUsedProxy(nsIEventQueue *destQueue,
|
||||
ProxyType proxyType,
|
||||
nsISupports *aObj,
|
||||
REFNSIID aIID);
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
private:
|
||||
nsProxyEventObject(); // not implemented
|
||||
nsProxyEventObject(PLEventQueue *destQueue,
|
||||
nsProxyEventObject(nsIEventQueue *destQueue,
|
||||
ProxyType proxyType,
|
||||
nsISupports* aObj,
|
||||
nsProxyEventClass* aClass,
|
||||
@@ -131,13 +131,13 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROXYEVENT_MANAGER_IID);
|
||||
|
||||
NS_IMETHOD GetProxyObject(PLEventQueue *destQueue,
|
||||
NS_IMETHOD GetProxyObject(nsIEventQueue *destQueue,
|
||||
REFNSIID aIID,
|
||||
nsISupports* aObj,
|
||||
ProxyType proxyType,
|
||||
void** aProxyObject);
|
||||
|
||||
NS_IMETHOD GetProxyObject(PLEventQueue *destQueue,
|
||||
NS_IMETHOD GetProxyObject(nsIEventQueue *destQueue,
|
||||
const nsCID &aClass,
|
||||
nsISupports *aDelegate,
|
||||
const nsIID &aIID,
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
#include "plevent.h"
|
||||
|
||||
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
||||
|
||||
|
||||
@@ -136,7 +134,7 @@ nsProxyObjectManager::Create(nsISupports* outer, const nsIID& aIID, void* *aInst
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProxyObjectManager::GetProxyObject(PLEventQueue *destQueue, REFNSIID aIID, nsISupports* aObj, ProxyType proxyType, void** aProxyObject)
|
||||
nsProxyObjectManager::GetProxyObject(nsIEventQueue *destQueue, REFNSIID aIID, nsISupports* aObj, ProxyType proxyType, void** aProxyObject)
|
||||
{
|
||||
|
||||
*aProxyObject = nsnull;
|
||||
@@ -153,7 +151,7 @@ nsProxyObjectManager::GetProxyObject(PLEventQueue *destQueue, REFNSIID aIID, nsI
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsProxyObjectManager::GetProxyObject(PLEventQueue *destQueue,
|
||||
nsProxyObjectManager::GetProxyObject(nsIEventQueue *destQueue,
|
||||
const nsCID &aClass,
|
||||
nsISupports *aDelegate,
|
||||
const nsIID &aIID,
|
||||
|
||||
Reference in New Issue
Block a user