Bug 807437 - Eliminate redundant Traverse/Unlink CC macros - part 2: handmade fixups - r=mccr8
authorBenoit Jacob <bjacob@mozilla.com>
Thu, 15 Nov 2012 02:32:40 -0500
changeset 113362 dce37eb7b01a1992fb246e425677ce67cafd039b
parent 113361 6c9caeb3422baf2deb41953f9dce0c2acf2a06cd
child 113363 7468f7af19d54c209ec9b2d018d23657321e402e
push id23869
push useremorley@mozilla.com
push dateThu, 15 Nov 2012 16:18:16 +0000
treeherdermozilla-central@a37525d304d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs807437
milestone19.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 807437 - Eliminate redundant Traverse/Unlink CC macros - part 2: handmade fixups - r=mccr8
content/xbl/src/nsBindingManager.cpp
js/xpconnect/src/event_impl_gen.py
xpcom/glue/nsCycleCollectionParticipant.h
--- a/content/xbl/src/nsBindingManager.cpp
+++ b/content/xbl/src/nsBindingManager.cpp
@@ -133,18 +133,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ns
   NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsAnonymousContentList)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mContent)
   {
     int32_t i, count = tmp->mElements->Length();
     for (i = 0; i < count; ++i) {
-      NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mElements->ElementAt(i),
-                                                      nsXBLInsertionPoint);
+      NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mElements->ElementAt(i));
     }
   }
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(nsAnonymousContentList)
   NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
 NS_IMPL_CYCLE_COLLECTION_TRACE_END
 
--- a/js/xpconnect/src/event_impl_gen.py
+++ b/js/xpconnect/src/event_impl_gen.py
@@ -286,21 +286,21 @@ def write_cpp(eventname, iface, fd):
     fd.write("protected:\n")
     for a in attributes:
         fd.write("  %s\n" % attributeVariableTypeAndName(a))
     fd.write("};\n\n")
 
     fd.write("NS_IMPL_CYCLE_COLLECTION_CLASS(%s)\n\n" % classname)
     fd.write("NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(%s, %s)\n" % (classname, basename))
     for c in ccattributes:
-        fd.write("  NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(m%s)\n" % firstCap(c.name))
+        fd.write("  NS_IMPL_CYCLE_COLLECTION_UNLINK(m%s)\n" % firstCap(c.name))
     fd.write("NS_IMPL_CYCLE_COLLECTION_UNLINK_END\n\n");
     fd.write("NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(%s, %s)\n" % (classname, basename))
     for c in ccattributes:
-        fd.write("  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(m%s)\n" % firstCap(c.name))
+        fd.write("  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(m%s)\n" % firstCap(c.name))
     fd.write("NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END\n\n");
 
     fd.write("NS_IMPL_ADDREF_INHERITED(%s, %s)\n" % (classname, basename))
     fd.write("NS_IMPL_RELEASE_INHERITED(%s, %s)\n\n" % (classname, basename))
 
     fd.write("DOMCI_DATA(%s, %s)\n\n" % (eventname, classname))
 
     fd.write("NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(%s)\n" % classname)
--- a/xpcom/glue/nsCycleCollectionParticipant.h
+++ b/xpcom/glue/nsCycleCollectionParticipant.h
@@ -395,25 +395,16 @@ T* DowncastCCParticipant(void *p)
     NS_CYCLE_COLLECTION_CLASSNAME(_base_class)::UnlinkImpl(s);
 
 #define NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_NATIVE(_class)                   \
   NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(_class)
 
 #define NS_IMPL_CYCLE_COLLECTION_UNLINK(_field)                                \
     ImplCycleCollectionUnlink(tmp->_field);
 
-#define NS_IMPL_CYCLE_COLLECTION_UNLINK(_field)                       \
-    NS_IMPL_CYCLE_COLLECTION_UNLINK(_field)
-
-#define NS_IMPL_CYCLE_COLLECTION_UNLINK(_field)                     \
-    NS_IMPL_CYCLE_COLLECTION_UNLINK(_field)
-
-#define NS_IMPL_CYCLE_COLLECTION_UNLINK(_field)                       \
-    NS_IMPL_CYCLE_COLLECTION_UNLINK(_field)
-
 #define NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                    \
     (void)tmp;                                                                 \
     return NS_OK;                                                              \
   }
 
 #define NS_IMPL_CYCLE_COLLECTION_UNLINK_0(_class)                              \
   NS_METHOD                                                                    \
   NS_CYCLE_COLLECTION_CLASSNAME(_class)::UnlinkImpl(void *p)                   \
@@ -466,40 +457,16 @@ T* DowncastCCParticipant(void *p)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_class)
 
 #define NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)                              \
   ImplCycleCollectionTraverse(cb, tmp->_field, #_field, 0);
 
 #define NS_IMPL_CYCLE_COLLECTION_TRAVERSE_RAWPTR(_field)                       \
   CycleCollectionNoteChild(cb, tmp->_field, #_field);
 
-#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)                     \
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)
-
-#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)    \
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)
-
-#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)                   \
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)
-
-#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_ptr)  \
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_ptr)
-
-#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)  \
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)
-
-#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_array)                      \
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_array)
-
-#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)         \
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)
-
-#define NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)      \
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_field)
-
 #define NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS                       \
     that->Trace(p, &nsScriptObjectTracer::NoteJSChild, &cb);
 
 #define NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END                                  \
     (void)tmp;                                                                 \
     return NS_OK;                                                              \
   }