automatic-nuker
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 165 aef82785a2308e43efecc8fa9addeb0456d09895
permissions -rw-r--r--
State as of now

Automatically generated patch: make a static list of classes inherit from GCObject, and remove destructors and such

diff --git a/content/xslt/src/base/txCore.h b/content/xslt/src/base/txCore.h
--- a/content/xslt/src/base/txCore.h
+++ b/content/xslt/src/base/txCore.h
@@ -48,21 +48,18 @@
 
 class nsAString;
 
-class txObject
+class txObject: public XPCOMGCObject
 {
 public:
     txObject()
     {
-        MOZ_COUNT_CTOR(txObject);
+        ;
     }
 
     /**
      * Deletes this txObject
      */
-    virtual ~txObject()
-    {
-        MOZ_COUNT_DTOR(txObject);
-    }
+    
 };
 
 /**
diff --git a/content/xslt/src/xpath/txExpr.h b/content/xslt/src/xpath/txExpr.h
--- a/content/xslt/src/xpath/txExpr.h
+++ b/content/xslt/src/xpath/txExpr.h
@@ -67,17 +67,14 @@ class txXPathNode;
 /**
  * A Base Class for all XSL Expressions
 **/
-class Expr
+class Expr: public XPCOMGCObject
 {
 public:
     Expr()
     {
-        MOZ_COUNT_CTOR(Expr);
+        ;
     }
-    virtual ~Expr()
-    {
-        MOZ_COUNT_DTOR(Expr);
-    }
+    
 
     /**
      * Evaluates this Expr based on the given context node and processor state
diff --git a/content/xul/document/src/nsXULControllers.h b/content/xul/document/src/nsXULControllers.h
--- a/content/xul/document/src/nsXULControllers.h
+++ b/content/xul/document/src/nsXULControllers.h
@@ -53,7 +53,7 @@
 #include "nsCycleCollectionParticipant.h"
 
 /* non-XPCOM class for holding controllers and their IDs */
-class nsXULControllerData
+class nsXULControllerData: public XPCOMGCObject
 {
 public:
                             nsXULControllerData(PRUint32 inControllerID, nsIController* inController)
@@ -62,7 +62,7 @@ public:
                             {                            
                             }
 
-                            ~nsXULControllerData() {}
+                            
 
     PRUint32                GetControllerID()   { return mControllerID; }
 
diff --git a/content/xul/templates/src/nsRDFBinding.h b/content/xul/templates/src/nsRDFBinding.h
--- a/content/xul/templates/src/nsRDFBinding.h
+++ b/content/xul/templates/src/nsRDFBinding.h
@@ -51,7 +51,7 @@ class nsBindingValues;
 /*
  * a  <binding> descriptors
  */
-class RDFBinding {
+class RDFBinding: public XPCOMGCObject {
 
 public:
 
@@ -78,13 +78,10 @@ private:
         mHasDependency(PR_FALSE),
         mNext(nsnull)
     {
-        MOZ_COUNT_CTOR(RDFBinding);
+        ;
     }
 
-    ~RDFBinding()
-    {
-        MOZ_COUNT_DTOR(RDFBinding);
-    }
+    
 };
 
 /*
diff --git a/content/xul/templates/src/nsRuleNetwork.cpp b/content/xul/templates/src/nsRuleNetwork.cpp
--- a/content/xul/templates/src/nsRuleNetwork.cpp
+++ b/content/xul/templates/src/nsRuleNetwork.cpp
@@ -222,7 +222,7 @@ InstantiationSet::InstantiationSet()
 InstantiationSet::InstantiationSet()
 {
     mHead.mPrev = mHead.mNext = &mHead;
-    MOZ_COUNT_CTOR(InstantiationSet);
+    ;
 }
 
 
@@ -235,7 +235,7 @@ InstantiationSet::InstantiationSet(const
     for (ConstIterator inst = aInstantiationSet.First(); inst != last; ++inst)
         Append(*inst);
 
-    MOZ_COUNT_CTOR(InstantiationSet);
+    ;
 }
 
 InstantiationSet&
diff --git a/content/xul/templates/src/nsRuleNetwork.h b/content/xul/templates/src/nsRuleNetwork.h
--- a/content/xul/templates/src/nsRuleNetwork.h
+++ b/content/xul/templates/src/nsRuleNetwork.h
@@ -87,10 +87,10 @@ class nsXULTemplateQueryProcessorRDF;
  * matched. When an assertion is removed from the graph, this map is consulted
  * to determine which results will no longer match.
  */
-class MemoryElement {
+class MemoryElement: public XPCOMGCObject {
 protected:
-    MemoryElement() { MOZ_COUNT_CTOR(MemoryElement); }
-    virtual ~MemoryElement() { MOZ_COUNT_DTOR(MemoryElement); }
+    MemoryElement() { ; }
+    
 public:
 
     virtual const char* Type() const = 0;
@@ -111,7 +111,7 @@ public:
 /**
  * A collection of memory elements
  */
-class MemoryElementSet {
+class MemoryElementSet: public XPCOMGCObject {
 public:
     class ConstIterator;
     friend class ConstIterator;
@@ -133,10 +133,10 @@ protected:
 
 public:
     MemoryElementSet() : mElements(nsnull) {
-        MOZ_COUNT_CTOR(MemoryElementSet); }
+        ; }
 
     MemoryElementSet(const MemoryElementSet& aSet) : mElements(aSet.mElements) {
-        MOZ_COUNT_CTOR(MemoryElementSet);
+        ;
         NS_IF_ADDREF(mElements); }
 
     MemoryElementSet& operator=(const MemoryElementSet& aSet) {
@@ -145,9 +145,7 @@ public:
         NS_IF_ADDREF(mElements);
         return *this; }
         
-    ~MemoryElementSet() {
-        MOZ_COUNT_DTOR(MemoryElementSet);
-        NS_IF_RELEASE(mElements); }
+    
 
 public:
     class ConstIterator {
@@ -254,7 +252,7 @@ public:
  * A collection of value-to-variable assignments that minimizes
  * copying by sharing subsets when possible.
  */
-class nsAssignmentSet {
+class nsAssignmentSet: public XPCOMGCObject {
 public:
     class ConstIterator;
     friend class ConstIterator;
@@ -274,11 +272,11 @@ public:
 public:
     nsAssignmentSet()
         : mAssignments(nsnull)
-        { MOZ_COUNT_CTOR(nsAssignmentSet); }
+        { ; }
 
     nsAssignmentSet(const nsAssignmentSet& aSet)
         : mAssignments(aSet.mAssignments) {
-        MOZ_COUNT_CTOR(nsAssignmentSet);
+        ;
         NS_IF_ADDREF(mAssignments); }
 
     nsAssignmentSet& operator=(const nsAssignmentSet& aSet) {
@@ -287,9 +285,7 @@ public:
         NS_IF_ADDREF(mAssignments);
         return *this; }
 
-    ~nsAssignmentSet() {
-        MOZ_COUNT_DTOR(nsAssignmentSet);
-        NS_IF_RELEASE(mAssignments); }
+    
 
 public:
     class ConstIterator {
@@ -492,16 +488,14 @@ public:
 /**
  * A collection of intantiations
  */
-class InstantiationSet
+class InstantiationSet: public XPCOMGCObject
 {
 public:
     InstantiationSet();
     InstantiationSet(const InstantiationSet& aInstantiationSet);
     InstantiationSet& operator=(const InstantiationSet& aInstantiationSet);
 
-    ~InstantiationSet() {
-        MOZ_COUNT_DTOR(InstantiationSet);
-        Clear(); }
+    
 
     class ConstIterator;
     friend class ConstIterator;
@@ -633,11 +627,11 @@ public:
 /**
  * A abstract base class for all nodes in the rule network
  */
-class ReteNode
+class ReteNode: public XPCOMGCObject
 {
 public:
     ReteNode() {}
-    virtual ~ReteNode() {}
+    
 
     /**
      * Propagate a set of instantiations "down" through the
diff --git a/content/xul/templates/src/nsTemplateRule.cpp b/content/xul/templates/src/nsTemplateRule.cpp
--- a/content/xul/templates/src/nsTemplateRule.cpp
+++ b/content/xul/templates/src/nsTemplateRule.cpp
@@ -293,26 +293,11 @@ nsTemplateRule::nsTemplateRule(nsIConten
           mBindings(nsnull),
           mConditions(nsnull)
 {
-    MOZ_COUNT_CTOR(nsTemplateRule);
+    ;
     mRuleNode = do_QueryInterface(aRuleNode);
 }
 
-nsTemplateRule::~nsTemplateRule()
-{
-    MOZ_COUNT_DTOR(nsTemplateRule);
 
-    while (mBindings) {
-        Binding* doomed = mBindings;
-        mBindings = mBindings->mNext;
-        delete doomed;
-    }
-
-    while (mConditions) {
-        nsTemplateCondition* cdel = mConditions;
-        mConditions = mConditions->GetNext();
-        delete cdel;
-    }
-}
 
 nsresult
 nsTemplateRule::GetAction(nsIContent** aAction) const
diff --git a/content/xul/templates/src/nsTemplateRule.h b/content/xul/templates/src/nsTemplateRule.h
--- a/content/xul/templates/src/nsTemplateRule.h
+++ b/content/xul/templates/src/nsTemplateRule.h
@@ -136,14 +136,14 @@ protected:
  * - Content that should be constructed when the rule is "activated".
  *
  */
-class nsTemplateRule
+class nsTemplateRule: public XPCOMGCObject
 {
 public:
     nsTemplateRule(nsIContent* aRuleNode,
                    nsIContent* aAction,
                    nsTemplateQuerySet* aQuerySet);
 
-    ~nsTemplateRule();
+    
 
     /**
      * Return the <action> node that this rule was constructed from, or its
@@ -270,7 +270,7 @@ protected:
  *  These queryset objects are created and owned by the builder in its
  *  mQuerySets array.
  */
-class nsTemplateQuerySet
+class nsTemplateQuerySet: public XPCOMGCObject
 {
 protected:
     nsVoidArray mRules; // rules owned by nsTemplateQuerySet
@@ -296,14 +296,10 @@ public:
     nsTemplateQuerySet(PRInt32 aPriority)
         : mPriority(aPriority)
     {
-        MOZ_COUNT_CTOR(nsTemplateQuerySet);
+        ;
     }
 
-    ~nsTemplateQuerySet()
-    {
-        MOZ_COUNT_DTOR(nsTemplateQuerySet);
-        Clear();
-    }
+    
 
     PRInt32 Priority() const
     {