changed the mechanism underlying |do_QueryInterface| to decouple |nsCOMPtr| from services, |nsIWeakReference|, etc. This change fixes bug #17364, and paves the way for making |nsCOMPtr| cooperate with services. r=valeski (additional builds done by dmose and syd)

This commit is contained in:
scc@netscape.com
1999-10-31 00:35:48 +00:00
parent f57aa0bb25
commit 68eaf65ae1
10 changed files with 320 additions and 213 deletions

View File

@@ -90,6 +90,21 @@ static NS_DEFINE_CID(kNoCID, NS_NO_CID);
#define USE_REGISTRY
#endif /* USE_NSREG */
nsresult
nsCreateInstance::operator()( const nsIID& aIID, void** answer ) const
{
nsresult status;
if ( mFactory )
status = mFactory->CreateInstance(mOuter, aIID, answer);
else
status = NS_ERROR_NULL_POINTER;
if ( mErrorPtr )
*mErrorPtr = status;
return status;
}
/* prototypes for the Mac */
PRBool
nsFactoryEntry_Destroy(nsHashKey *aKey, void *aData, void* closure);