Bug 514280 Remove GetIID r=bsmedberg

--HG--
extra : rebase_source : 179d6cd1cfb272ca258b0bc64225b27252c9ffbe
This commit is contained in:
Neil Rashbrook 2014-03-17 19:07:46 +00:00
parent 3e8915c4b8
commit af909242bc
5 changed files with 7 additions and 8 deletions

View File

@ -52,7 +52,7 @@ nsExternalSharingAppService::GetSharingApps(const nsAString & aMIMEType,
static_cast<nsISharingHandlerApp**>(NS_Alloc(sizeof(nsISharingHandlerApp*)
* *aLen));
for (uint32_t i = 0; i < *aLen; i++) {
rv = array->QueryElementAt(i, nsISharingHandlerApp::GetIID(),
rv = array->QueryElementAt(i, NS_GET_IID(nsISharingHandlerApp),
(void**)(*aHandlers + i));
NS_ENSURE_SUCCESS(rv, rv);
}

View File

@ -123,8 +123,7 @@ typedef nsID nsIID;
struct COMTypeInfo \
{ \
static const nsIID kIID NS_HIDDEN; \
}; \
static const nsIID& GetIID() {return COMTypeInfo<int>::kIID;}
};
#define NS_DEFINE_STATIC_IID_ACCESSOR(the_interface, the_iid) \
template <class Dummy> \

View File

@ -137,7 +137,7 @@ IFoo::QueryInterface( const nsIID& aIID, void** aResult )
nsISupports* rawPtr = 0;
nsresult status = NS_OK;
if ( aIID.Equals(GetIID()) )
if ( aIID.Equals(NS_GET_IID(IFoo)) )
rawPtr = this;
else
{
@ -227,7 +227,7 @@ IBar::QueryInterface( const nsID& aIID, void** aResult )
nsISupports* rawPtr = 0;
nsresult status = NS_OK;
if ( aIID.Equals(GetIID()) )
if ( aIID.Equals(NS_GET_IID(IBar)) )
rawPtr = this;
else if ( aIID.Equals(NS_GET_IID(IFoo)) )
rawPtr = static_cast<IFoo*>(this);

View File

@ -281,7 +281,7 @@ IFoo::QueryInterface( const nsIID& aIID, void** aResult )
nsISupports* rawPtr = 0;
nsresult status = NS_OK;
if ( aIID.Equals(GetIID()) )
if ( aIID.Equals(NS_GET_IID(IFoo)) )
rawPtr = this;
else
{

View File

@ -138,7 +138,7 @@ Foo::QueryInterface( const nsIID& aIID, void** aResult )
nsISupports* rawPtr = 0;
nsresult status = NS_OK;
if ( aIID.Equals(GetIID()) )
if ( aIID.Equals(NS_GET_IID(Foo)) )
rawPtr = this;
else
{
@ -228,7 +228,7 @@ Bar::QueryInterface( const nsID& aIID, void** aResult )
nsISupports* rawPtr = 0;
nsresult status = NS_OK;
if ( aIID.Equals(GetIID()) )
if ( aIID.Equals(NS_GET_IID(Bar)) )
rawPtr = this;
else if ( aIID.Equals(NS_GET_IID(Foo)) )
rawPtr = static_cast<Foo*>(this);