Bug 1372061 - Shuffle some fields around to avoid bindgen issues. r=emilio
authorCameron McCormack <cam@mcc.id.au>
Thu, 29 Jun 2017 22:39:31 -0700
changeset 366827 bcfb78bcc781fa2f565bf5fd4b5c8939248341e3
parent 366826 246124863988e9a247024d8673d378e195231a30
child 366828 5be4a5869c0325ab58fb7428ff2923b7f457d273
push id45756
push usercmccormack@mozilla.com
push dateFri, 30 Jun 2017 05:40:13 +0000
treeherderautoland@bcfb78bcc781 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1372061
milestone56.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 1372061 - Shuffle some fields around to avoid bindgen issues. r=emilio MozReview-Commit-ID: IMzcnJRtGJi
dom/base/ChildIterator.h
--- a/dom/base/ChildIterator.h
+++ b/dom/base/ChildIterator.h
@@ -35,34 +35,36 @@ namespace dom {
 class ExplicitChildIterator
 {
 public:
   explicit ExplicitChildIterator(const nsIContent* aParent,
                                  bool aStartAtBeginning = true)
     : mParent(aParent),
       mChild(nullptr),
       mDefaultChild(nullptr),
-      mIndexInInserted(0),
-      mIsFirst(aStartAtBeginning)
+      mIsFirst(aStartAtBeginning),
+      mIndexInInserted(0)
   {
   }
 
   ExplicitChildIterator(const ExplicitChildIterator& aOther)
     : mParent(aOther.mParent), mChild(aOther.mChild),
       mDefaultChild(aOther.mDefaultChild),
       mShadowIterator(aOther.mShadowIterator ?
                       new ExplicitChildIterator(*aOther.mShadowIterator) :
                       nullptr),
-      mIndexInInserted(aOther.mIndexInInserted), mIsFirst(aOther.mIsFirst) {}
+      mIsFirst(aOther.mIsFirst),
+      mIndexInInserted(aOther.mIndexInInserted) {}
 
   ExplicitChildIterator(ExplicitChildIterator&& aOther)
     : mParent(aOther.mParent), mChild(aOther.mChild),
       mDefaultChild(aOther.mDefaultChild),
       mShadowIterator(Move(aOther.mShadowIterator)),
-      mIndexInInserted(aOther.mIndexInInserted), mIsFirst(aOther.mIsFirst) {}
+      mIsFirst(aOther.mIsFirst),
+      mIndexInInserted(aOther.mIndexInInserted) {}
 
   nsIContent* GetNextChild();
 
   // Looks for aChildToFind respecting insertion points until aChildToFind is
   // found.  This version can take shortcuts that the two-argument version
   // can't, so can be faster (and in fact can be O(1) instead of O(N) in many
   // cases).
   bool Seek(nsIContent* aChildToFind);
@@ -114,24 +116,24 @@ protected:
   // to null, we continue iterating at mChild's next sibling.
   nsIContent* mDefaultChild;
 
   // If non-null, this points to an iterator of the explicit children of
   // the ShadowRoot projected by the current shadow element that we're
   // iterating.
   nsAutoPtr<ExplicitChildIterator> mShadowIterator;
 
+  // A flag to let us know that we haven't started iterating yet.
+  bool mIsFirst;
+
   // If not zero, we're iterating inserted children for an insertion point. This
   // is an index into mChild's inserted children array (mChild must be an
   // nsXBLChildrenElement). The index is one past the "current" child (as
   // opposed to mChild which represents the "current" child).
   uint32_t mIndexInInserted;
-
-  // A flag to let us know that we haven't started iterating yet.
-  bool mIsFirst;
 };
 
 // Iterates over the flattened children of a node, which accounts for anonymous
 // children and nodes moved by insertion points. If a node has anonymous
 // children, those are iterated over.  The iterator can be initialized to start
 // at the end by providing false for aStartAtBeginning in order to start
 // iterating in reverse from the last child.
 class FlattenedChildIterator : public ExplicitChildIterator