Bug 514280 Remove GetIID r=bsmedberg
☠☠ backed out by cfe51017482e ☠ ☠
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Mon, 17 Mar 2014 19:07:46 +0000
changeset 173968 2a015b45d8085e960f6bdd88e891989d96a2ee9e
parent 173967 a01f97c1ed02e49e8d4289d8e9b5544f67c856bb
child 173969 6311a62c590148d3b41a35b6ea64b06d3a76717d
push id26438
push userphilringnalda@gmail.com
push dateTue, 18 Mar 2014 05:39:07 +0000
treeherderautoland@89275f0ae29f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs514280
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 514280 Remove GetIID r=bsmedberg
uriloader/exthandler/android/nsExternalSharingAppService.cpp
xpcom/glue/nsID.h
xpcom/tests/TestCOMPtr.cpp
xpcom/tests/TestHashtables.cpp
xpcom/tests/TestRefPtr.cpp
--- a/uriloader/exthandler/android/nsExternalSharingAppService.cpp
+++ b/uriloader/exthandler/android/nsExternalSharingAppService.cpp
@@ -47,14 +47,14 @@ nsExternalSharingAppService::GetSharingA
     return NS_OK;
   AndroidBridge::Bridge()->GetHandlersForMimeType(aMIMEType, array,
                                                   nullptr, sendAction);
   array->GetLength(aLen);
   *aHandlers =
     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);
   }
   return NS_OK;
 }
--- a/xpcom/glue/nsID.h
+++ b/xpcom/glue/nsID.h
@@ -118,18 +118,17 @@ typedef nsID nsIID;
  * merged on windows). Dummy should always be instantiated as "int".
  */
 
 #define NS_DECLARE_STATIC_IID_ACCESSOR(the_iid)                         \
   template <class Dummy>                                                \
   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>                                                \
   const nsIID the_interface::COMTypeInfo<Dummy>::kIID NS_HIDDEN = the_iid;
 
 /**
  * A macro to build the static const CID accessor method
  */
--- a/xpcom/tests/TestCOMPtr.cpp
+++ b/xpcom/tests/TestCOMPtr.cpp
@@ -132,17 +132,17 @@ IFoo::Release()
 
 nsresult
 IFoo::QueryInterface( const nsIID& aIID, void** aResult )
 	{
     printf("IFoo@%p::QueryInterface()\n", static_cast<void*>(this));
 		nsISupports* rawPtr = 0;
 		nsresult status = NS_OK;
 
-		if ( aIID.Equals(GetIID()) )
+		if ( aIID.Equals(NS_GET_IID(IFoo)) )
 			rawPtr = this;
 		else
 			{
 				nsID iid_of_ISupports = NS_ISUPPORTS_IID;
 				if ( aIID.Equals(iid_of_ISupports) )
 					rawPtr = static_cast<nsISupports*>(this);
 				else
 					status = NS_ERROR_NO_INTERFACE;
@@ -222,17 +222,17 @@ IBar::~IBar()
 
 nsresult
 IBar::QueryInterface( const nsID& aIID, void** aResult )
 	{
     printf("IBar@%p::QueryInterface()\n", static_cast<void*>(this));
 		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);
 		else
 			{
 				nsID iid_of_ISupports = NS_ISUPPORTS_IID;
 				if ( aIID.Equals(iid_of_ISupports) )
 					rawPtr = static_cast<nsISupports*>(this);
--- a/xpcom/tests/TestHashtables.cpp
+++ b/xpcom/tests/TestHashtables.cpp
@@ -276,17 +276,17 @@ IFoo::Release()
 
 nsresult
 IFoo::QueryInterface( const nsIID& aIID, void** aResult )
   {
     printf("IFoo@%p::QueryInterface()\n", static_cast<void*>(this));
     nsISupports* rawPtr = 0;
     nsresult status = NS_OK;
 
-    if ( aIID.Equals(GetIID()) )
+    if ( aIID.Equals(NS_GET_IID(IFoo)) )
       rawPtr = this;
     else
       {
         nsID iid_of_ISupports = NS_ISUPPORTS_IID;
         if ( aIID.Equals(iid_of_ISupports) )
           rawPtr = static_cast<nsISupports*>(this);
         else
           status = NS_ERROR_NO_INTERFACE;
--- a/xpcom/tests/TestRefPtr.cpp
+++ b/xpcom/tests/TestRefPtr.cpp
@@ -133,17 +133,17 @@ Foo::Release()
 
 nsresult
 Foo::QueryInterface( const nsIID& aIID, void** aResult )
 	{
     printf("Foo@%p::QueryInterface()\n", static_cast<void*>(this));
 		nsISupports* rawPtr = 0;
 		nsresult status = NS_OK;
 
-		if ( aIID.Equals(GetIID()) )
+		if ( aIID.Equals(NS_GET_IID(Foo)) )
 			rawPtr = this;
 		else
 			{
 				nsID iid_of_ISupports = NS_ISUPPORTS_IID;
 				if ( aIID.Equals(iid_of_ISupports) )
 					rawPtr = static_cast<nsISupports*>(this);
 				else
 					status = NS_ERROR_NO_INTERFACE;
@@ -223,17 +223,17 @@ Bar::~Bar()
 
 nsresult
 Bar::QueryInterface( const nsID& aIID, void** aResult )
 	{
     printf("Bar@%p::QueryInterface()\n", static_cast<void*>(this));
 		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);
 		else
 			{
 				nsID iid_of_ISupports = NS_ISUPPORTS_IID;
 				if ( aIID.Equals(iid_of_ISupports) )
 					rawPtr = static_cast<nsISupports*>(this);