Turned on the do_GetInterface implementation by removing the #ifdef 0.

This commit is contained in:
tbogard%aol.net 1999-11-28 02:16:22 +00:00
Родитель 963f9e7043
Коммит dec406dc95
2 изменённых файлов: 17 добавлений и 21 удалений

Просмотреть файл

@ -23,28 +23,26 @@
#include "nsIInterfaceRequestor.h"
#if 0
nsresult
nsGetInterface::operator()( const nsIID& aIID, void** aInstancePtr ) const
{
nsresult status;
{
nsresult status;
if ( mSource )
{
nsCOMPtr<nsIInterfaceRequestor> factoryPtr = do_QueryInterface(mSource, &status);
NS_ASSERTION(factoryPtr, "Did you know you were calling |do_GetInterface()| on an object that doesn't support the |nsIInterfaceRequestor| interface?");
if ( mSource )
{
nsCOMPtr<nsIInterfaceRequestor> factoryPtr = do_QueryInterface(mSource, &status);
NS_ASSERTION(factoryPtr, "Did you know you were calling |do_GetInterface()| on an object that doesn't support the |nsIInterfaceRequestor| interface?");
if ( factoryPtr )
status = factoryPtr->GetInterface(aIID, aInstancePtr);
if ( factoryPtr )
status = factoryPtr->GetInterface(aIID, aInstancePtr);
if ( !NS_SUCCEEDED(status) )
*aInstancePtr = 0;
}
else
status = NS_ERROR_NULL_POINTER;
if ( !NS_SUCCEEDED(status) )
*aInstancePtr = 0;
}
else
status = NS_ERROR_NULL_POINTER;
if ( mErrorPtr )
*mErrorPtr = status;
return status;
}
#endif
if ( mErrorPtr )
*mErrorPtr = status;
return status;
}

Просмотреть файл

@ -50,7 +50,6 @@ interface nsIInterfaceRequestor : nsISupports
%{C++
#if 0
#ifndef nsCOMPtr_h___
#include "nsCOMPtr.h"
#endif
@ -78,6 +77,5 @@ do_GetInterface( nsISupports* aSource, nsresult* error = 0 )
{
return nsGetInterface(aSource, error);
}
#endif
%}