Bug 1342303 part 6 - Remove nsCOMArray::Enumerate{Forwards,Backwards}. r=erahm
☠☠ backed out by b0b40ce3dfe5 ☠ ☠
authorXidorn Quan <me@upsuper.org>
Fri, 24 Feb 2017 21:37:07 +1100
changeset 345683 89137679a68cce70e8307b58e91cc9ade3f56b2c
parent 345682 20a1bcb47c33f96691fabd451bc54db13d3c7e26
child 345684 b0b40ce3dfe576bd23aba0e0de79c221564b8f13
push id31443
push usercbook@mozilla.com
push dateFri, 03 Mar 2017 12:01:25 +0000
treeherdermozilla-central@31c09bb63b69 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1342303
milestone54.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 1342303 part 6 - Remove nsCOMArray::Enumerate{Forwards,Backwards}. r=erahm MozReview-Commit-ID: GLappWGZdtz
layout/style/GroupRule.h
xpcom/ds/nsCOMArray.h
--- a/layout/style/GroupRule.h
+++ b/layout/style/GroupRule.h
@@ -53,17 +53,17 @@ public:
   virtual void SetStyleSheet(StyleSheet* aSheet) override;
 
 public:
   void AppendStyleRule(Rule* aRule);
 
   int32_t StyleRuleCount() const { return mRules.Count(); }
   Rule* GetStyleRuleAt(int32_t aIndex) const;
 
-  typedef IncrementalClearCOMRuleArray::nsCOMArrayEnumFunc RuleEnumFunc;
+  typedef bool (*RuleEnumFunc)(Rule* aElement, void* aData);
   bool EnumerateRulesForwards(RuleEnumFunc aFunc, void * aData) const;
 
   /*
    * The next three methods should never be called unless you have first
    * called WillDirty() on the parent stylesheet.  After they are
    * called, DidDirty() needs to be called on the sheet.
    */
   nsresult DeleteStyleRuleAt(uint32_t aIndex);
--- a/xpcom/ds/nsCOMArray.h
+++ b/xpcom/ds/nsCOMArray.h
@@ -339,34 +339,16 @@ public:
     nsCOMArray_base::ReplaceObjectAt(aObject, aIndex);
   }
   // nsTArray-compatible version
   void ReplaceElementAt(uint32_t aIndex, T* aElement)
   {
     nsCOMArray_base::ReplaceElementAt(aIndex, aElement);
   }
 
-  // Enumerator callback function. Return false to stop
-  // Here's a more readable form:
-  // bool enumerate(T* aElement, void* aData)
-  typedef bool (*nsCOMArrayEnumFunc)(T* aElement, void* aData);
-
-  // enumerate through the array with a callback.
-  bool EnumerateForwards(nsCOMArrayEnumFunc aFunc, void* aData)
-  {
-    return nsCOMArray_base::EnumerateForwards(nsBaseArrayEnumFunc(aFunc),
-                                              aData);
-  }
-
-  bool EnumerateBackwards(nsCOMArrayEnumFunc aFunc, void* aData)
-  {
-    return nsCOMArray_base::EnumerateBackwards(nsBaseArrayEnumFunc(aFunc),
-                                               aData);
-  }
-
   typedef int (*nsCOMArrayComparatorFunc)(T* aElement1, T* aElement2,
                                           void* aData);
 
   void Sort(nsCOMArrayComparatorFunc aFunc, void* aData)
   {
     nsCOMArray_base::Sort(nsBaseArrayComparatorFunc(aFunc), aData);
   }