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

@@ -25,6 +25,20 @@
#include "nsWeakReference.h"
#include "nsCOMPtr.h"
nsresult
nsQueryReferent::operator()( const nsIID& aIID, void** answer ) const
{
nsresult status;
if ( mWeakPtr )
status = mWeakPtr->QueryReferent(aIID, answer);
else
status = NS_ERROR_NULL_POINTER;
if ( mErrorPtr )
*mErrorPtr = status;
return status;
}
NS_COM nsIWeakReference *
NS_GetWeakReference( nsISupports* aInstance, nsresult* aResult )
{