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:
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user