зеркало из https://github.com/mozilla/gecko-dev.git
Turned on the do_GetInterface implementation by removing the #ifdef 0.
This commit is contained in:
Родитель
963f9e7043
Коммит
dec406dc95
|
@ -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
|
||||
|
||||
%}
|
Загрузка…
Ссылка в новой задаче