removed errant |QueryInterface()|s in favor of appropriate macros, as part of bug#23737. Changed |NS_DEFINE_IID| to |NS_DEFINE_CID| where appropriate; or else removed it, and fixed up clients to use |NS_GET_IID| in the appropriate spots. Built and ran pre-checkin tests. r=pavlov ... who claims this shouldn't effect other platforms; but I'm watching anyway
git-svn-id: svn://10.0.0.236/trunk@59312 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -34,35 +34,9 @@
|
||||
#undef NS_FILE_FAILURE
|
||||
#define NS_FILE_FAILURE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES,(0xFFFF))
|
||||
|
||||
NS_IMPL_ADDREF(nsFileSpecWithUIImpl)
|
||||
NS_IMPL_RELEASE(nsFileSpecWithUIImpl)
|
||||
NS_IMPL_ISUPPORTS2(nsFileSpecWithUIImpl, nsIFileSpecWithUI, nsIFileSpec)
|
||||
|
||||
NS_IMETHODIMP nsFileSpecWithUIImpl::QueryInterface(REFNSIID aIID,
|
||||
void** aInstancePtr)
|
||||
{
|
||||
if (NULL == aInstancePtr) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
*aInstancePtr = NULL;
|
||||
|
||||
static NS_DEFINE_IID(kClassIID, nsCOMTypeInfo<nsIFileSpecWithUI>::GetIID());
|
||||
if (aIID.Equals(kClassIID))
|
||||
*aInstancePtr = (void*) this;
|
||||
else if (aIID.Equals(nsCOMTypeInfo<nsIFileSpec>::GetIID()))
|
||||
*aInstancePtr = (void*) this;
|
||||
else if (aIID.Equals(nsCOMTypeInfo<nsISupports>::GetIID()))
|
||||
*aInstancePtr = (void*) ((nsISupports*)this);
|
||||
|
||||
if (*aInstancePtr)
|
||||
{
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_NOINTERFACE;
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kCFileWidgetCID, NS_FILEWIDGET_CID);
|
||||
static NS_DEFINE_CID(kCFileWidgetCID, NS_FILEWIDGET_CID);
|
||||
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user