Bug 108603 - Remove NS_IMPL_QUERY_INTERFACE_INHERITED0. r=mccr8, r=froydnj
authorAidin Gharibnavaz <aidin@aidinhut.com>
Fri, 24 Jul 2015 12:13:00 -0400
changeset 255265 f9c7975723dafc6c9e735400b07688b3ef4cad22
parent 255264 a09752ef90bb03142cc94c2a480613bb876b3503
child 255266 f2fc1cd10a395aacb222515ee75e4b031925e2b1
push id14308
push userkwierso@gmail.com
push dateThu, 30 Jul 2015 03:22:19 +0000
treeherderfx-team@785f60f45b98 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8, froydnj
bugs108603
milestone42.0a1
Bug 108603 - Remove NS_IMPL_QUERY_INTERFACE_INHERITED0. r=mccr8, r=froydnj
image/MultipartImage.cpp
xpcom/glue/nsISupportsImpl.h
--- a/image/MultipartImage.cpp
+++ b/image/MultipartImage.cpp
@@ -130,19 +130,17 @@ MultipartImage::Init()
 }
 
 MultipartImage::~MultipartImage()
 {
   // Ask our ProgressTracker to drop its weak reference to us.
   mTracker->ResetImage();
 }
 
-NS_IMPL_QUERY_INTERFACE_INHERITED0(MultipartImage, ImageWrapper)
-NS_IMPL_ADDREF_INHERITED(MultipartImage, ImageWrapper)
-NS_IMPL_RELEASE_INHERITED(MultipartImage, ImageWrapper)
+NS_IMPL_ISUPPORTS_INHERITED0(MultipartImage, ImageWrapper)
 
 void
 MultipartImage::BeginTransitionToPart(Image* aNextPart)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aNextPart);
 
   if (mNextPart) {
--- a/xpcom/glue/nsISupportsImpl.h
+++ b/xpcom/glue/nsISupportsImpl.h
@@ -1002,21 +1002,16 @@ NS_IMETHODIMP_(MozExternalRefCountType) 
 #define NS_INTERFACE_TABLE_INHERITED0(Class) /* Nothing to do here */
 
 #define NS_INTERFACE_TABLE_INHERITED(aClass, ...)                             \
   MOZ_STATIC_ASSERT_VALID_ARG_COUNT(__VA_ARGS__);                             \
   NS_INTERFACE_TABLE_BEGIN                                                    \
     MOZ_FOR_EACH(NS_INTERFACE_TABLE_ENTRY, (aClass,), (__VA_ARGS__))          \
   NS_INTERFACE_TABLE_END
 
-#define NS_IMPL_QUERY_INTERFACE_INHERITED0(aClass, aSuper)                    \
-  NS_INTERFACE_TABLE_HEAD(aClass)                                             \
-  NS_INTERFACE_TABLE_INHERITED0(aClass)                                       \
-  NS_INTERFACE_TABLE_TAIL_INHERITING(aSuper)
-
 #define NS_IMPL_QUERY_INTERFACE_INHERITED(aClass, aSuper, ...)                \
   NS_INTERFACE_TABLE_HEAD(aClass)                                             \
   NS_INTERFACE_TABLE_INHERITED(aClass, __VA_ARGS__)                           \
   NS_INTERFACE_TABLE_TAIL_INHERITING(aSuper)
 
 /**
  * Convenience macros for implementing all nsISupports methods for
  * a simple class.
@@ -1031,17 +1026,18 @@ NS_IMETHODIMP_(MozExternalRefCountType) 
   NS_IMPL_QUERY_INTERFACE0(_class)
 
 #define NS_IMPL_ISUPPORTS(aClass, ...)                                        \
   NS_IMPL_ADDREF(aClass)                                                      \
   NS_IMPL_RELEASE(aClass)                                                     \
   NS_IMPL_QUERY_INTERFACE(aClass, __VA_ARGS__)
 
 #define NS_IMPL_ISUPPORTS_INHERITED0(aClass, aSuper)                          \
-    NS_IMPL_QUERY_INTERFACE_INHERITED0(aClass, aSuper)                        \
+    NS_INTERFACE_TABLE_HEAD(aClass)                                           \
+    NS_INTERFACE_TABLE_TAIL_INHERITING(aSuper)                                \
     NS_IMPL_ADDREF_INHERITED(aClass, aSuper)                                  \
     NS_IMPL_RELEASE_INHERITED(aClass, aSuper)                                 \
 
 #define NS_IMPL_ISUPPORTS_INHERITED(aClass, aSuper, ...)                      \
   NS_IMPL_QUERY_INTERFACE_INHERITED(aClass, aSuper, __VA_ARGS__)              \
   NS_IMPL_ADDREF_INHERITED(aClass, aSuper)                                    \
   NS_IMPL_RELEASE_INHERITED(aClass, aSuper)