зеркало из https://github.com/mozilla/pjs.git
CConverting line-endings to fix cement bustage. Extra ^Ms are A Bad Thing(tm).
This commit is contained in:
Родитель
7c8265e20c
Коммит
1a08b2e290
|
@ -152,69 +152,69 @@ nsProxyEventObject::GetNewOrUsedProxy(nsIEventQueue *destQueue,
|
|||
nsISupports *aObj,
|
||||
REFNSIID aIID)
|
||||
{
|
||||
if (!aObj)
|
||||
return nsnull;
|
||||
|
||||
nsISupports* rawObject = aObj;
|
||||
if (!aObj)
|
||||
return nsnull;
|
||||
|
||||
nsISupports* rawObject = aObj;
|
||||
|
||||
// make sure that the object pass in is not a proxy.
|
||||
nsCOMPtr<nsProxyEventObject> aIdentificationObject;
|
||||
nsresult rv = rawObject->QueryInterface(kProxyObject_Identity_Class_IID, getter_AddRefs(aIdentificationObject));
|
||||
|
||||
nsresult rv = rawObject->QueryInterface(kProxyObject_Identity_Class_IID, getter_AddRefs(aIdentificationObject));
|
||||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
// ATTENTION!!!!
|
||||
//
|
||||
// If you are hitting any of the assertions in this block of code,
|
||||
// please contact dougt@netscape.com.
|
||||
//
|
||||
|
||||
// if you hit this assertion, you might want to check out how
|
||||
// you are using proxies. You shouldn't need to be creating
|
||||
// a proxy from a proxy. -- dougt@netscape.com
|
||||
NS_ASSERTION(0, "Someone is building a proxy from a proxy");
|
||||
|
||||
NS_ASSERTION(aIdentificationObject, "where did my identification object go!");
|
||||
|
||||
if (!aIdentificationObject)
|
||||
return nsnull;
|
||||
{
|
||||
// ATTENTION!!!!
|
||||
//
|
||||
// If you are hitting any of the assertions in this block of code,
|
||||
// please contact dougt@netscape.com.
|
||||
//
|
||||
|
||||
// if you hit this assertion, you might want to check out how
|
||||
// you are using proxies. You shouldn't need to be creating
|
||||
// a proxy from a proxy. -- dougt@netscape.com
|
||||
NS_ASSERTION(0, "Someone is building a proxy from a proxy");
|
||||
|
||||
NS_ASSERTION(aIdentificationObject, "where did my identification object go!");
|
||||
|
||||
if (!aIdentificationObject)
|
||||
return nsnull;
|
||||
|
||||
// someone is asking us to create a proxy for a proxy. Lets get
|
||||
// the real object and build aproxy for that!
|
||||
rawObject = aIdentificationObject->GetRealObject();
|
||||
|
||||
NS_ASSERTION(rawObject, "where did my real object go!");
|
||||
|
||||
if (!rawObject)
|
||||
return nsnull;
|
||||
|
||||
NS_ASSERTION(rawObject, "where did my real object go!");
|
||||
|
||||
if (!rawObject)
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
// Get a class for this IID.
|
||||
nsCOMPtr<nsProxyEventClass> clazz = getter_AddRefs( nsProxyEventClass::GetNewOrUsedClass(aIID) );
|
||||
if(!clazz)
|
||||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsProxyEventObject> proxy;
|
||||
nsCOMPtr<nsProxyEventObject> root;
|
||||
nsProxyEventObject* peo;
|
||||
|
||||
// Get a class for this IID.
|
||||
nsCOMPtr<nsProxyEventClass> clazz = getter_AddRefs( nsProxyEventClass::GetNewOrUsedClass(aIID) );
|
||||
if(!clazz)
|
||||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsProxyEventObject> proxy;
|
||||
nsCOMPtr<nsProxyEventObject> root;
|
||||
nsProxyEventObject* peo;
|
||||
|
||||
// always find the native root if the |real| object.
|
||||
// this must not be a nsCOMPtr since we need to make sure that we do a QI.
|
||||
nsCOMPtr<nsISupports> rootObject;
|
||||
if(NS_FAILED(rawObject->QueryInterface(NS_GET_IID(nsISupports), getter_AddRefs(rootObject))))
|
||||
return nsnull;
|
||||
|
||||
NS_ASSERTION(rootObject, "where did my root object go!");
|
||||
if (!rootObject)
|
||||
return nsnull;
|
||||
|
||||
NS_ASSERTION(rootObject, "where did my root object go!");
|
||||
if (!rootObject)
|
||||
return nsnull;
|
||||
|
||||
/* get our hash table */
|
||||
nsProxyObjectManager *manager = nsProxyObjectManager::GetInstance();
|
||||
if (manager == nsnull)
|
||||
return nsnull;
|
||||
if (manager == nsnull)
|
||||
return nsnull;
|
||||
|
||||
nsHashtable *realToProxyMap = manager->GetRealObjectToProxyObjectMap();
|
||||
if (realToProxyMap == nsnull)
|
||||
if (realToProxyMap == nsnull)
|
||||
return nsnull;
|
||||
|
||||
// we need to do make sure that we addref the passed in object as well as ensure
|
||||
|
@ -224,9 +224,9 @@ nsProxyEventObject::GetNewOrUsedProxy(nsIEventQueue *destQueue,
|
|||
nsCOMPtr<nsISupports> requestedInterface;
|
||||
if(NS_FAILED(rawObject->QueryInterface(aIID, getter_AddRefs(requestedInterface))))
|
||||
return nsnull;
|
||||
|
||||
NS_ASSERTION(requestedInterface, "where did my requestedInterface object go!");
|
||||
if (!rootObject)
|
||||
|
||||
NS_ASSERTION(requestedInterface, "where did my requestedInterface object go!");
|
||||
if (!rootObject)
|
||||
return nsnull;
|
||||
|
||||
// this will be our key in the hash table.
|
||||
|
|
Загрузка…
Ссылка в новой задаче