Bug 1415470 - a11y: Fix VS2017 initializer list order warnings. r=yzen draft
authorChris Peterson <cpeterson@mozilla.com>
Mon, 06 Nov 2017 23:54:53 -0800
changeset 696742 e1ef3a81611b560fb98c790279f14ff540078b26
parent 696686 933f9cd9b3b9030399a11c19cb4e5117b29e2772
child 696743 d79c324dd748ddb92a2aa113d081fbed8b2a8937
push id88775
push usercpeterson@mozilla.com
push dateSat, 11 Nov 2017 04:30:06 +0000
reviewersyzen
bugs1415470
milestone58.0a1
Bug 1415470 - a11y: Fix VS2017 initializer list order warnings. r=yzen Reorder DocAccessibleParent's and DocAccessibleChild's constructor initializer lists to fix these VS2017 warnings: a11y/DocAccessibleParent.h(32): warning C5038: data member 'mozilla::a11y::DocAccessibleParent::mShutdown' will be initialized after data member 'mozilla::a11y::DocAccessibleParent::mEmulatedWindowHandle' accessible/ipc/win/DocAccessibleChild.cpp(22): warning C5038: data member 'mozilla::a11y::DocAccessibleChild::mEmulatedWindowHandle' will be initialized after data member 'mozilla::a11y::DocAccessibleChild::mIsRemoteConstructed' MozReview-Commit-ID: 8flWtpe13ob
accessible/ipc/DocAccessibleParent.h
accessible/ipc/win/DocAccessibleChild.cpp
--- a/accessible/ipc/DocAccessibleParent.h
+++ b/accessible/ipc/DocAccessibleParent.h
@@ -24,27 +24,28 @@ class xpcAccessibleGeneric;
  * an accessible document in a content process.
  */
 class DocAccessibleParent : public ProxyAccessible,
     public PDocAccessibleParent
 {
 public:
   DocAccessibleParent() :
     ProxyAccessible(this), mParentDoc(kNoParentDoc),
+#if defined(XP_WIN)
+    mEmulatedWindowHandle(nullptr),
+#endif // defined(XP_WIN)
     mTopLevel(false), mShutdown(false)
-#if defined(XP_WIN)
-                                      , mEmulatedWindowHandle(nullptr)
-#endif // defined(XP_WIN)
   {
     MOZ_COUNT_CTOR_INHERITED(DocAccessibleParent, ProxyAccessible);
     sMaxDocID++;
     mActorID = sMaxDocID;
     MOZ_ASSERT(!LiveDocs().Get(mActorID));
     LiveDocs().Put(mActorID, this);
   }
+
   ~DocAccessibleParent()
   {
     LiveDocs().Remove(mActorID);
     MOZ_COUNT_DTOR_INHERITED(DocAccessibleParent, ProxyAccessible);
     MOZ_ASSERT(mChildDocs.Length() == 0);
     MOZ_ASSERT(!ParentDoc());
   }
 
--- a/accessible/ipc/win/DocAccessibleChild.cpp
+++ b/accessible/ipc/win/DocAccessibleChild.cpp
@@ -14,18 +14,18 @@
 
 namespace mozilla {
 namespace a11y {
 
 static StaticAutoPtr<PlatformChild> sPlatformChild;
 
 DocAccessibleChild::DocAccessibleChild(DocAccessible* aDoc, IProtocol* aManager)
   : DocAccessibleChildBase(aDoc)
+  , mIsRemoteConstructed(false)
   , mEmulatedWindowHandle(nullptr)
-  , mIsRemoteConstructed(false)
 {
   MOZ_COUNT_CTOR_INHERITED(DocAccessibleChild, DocAccessibleChildBase);
   if (!sPlatformChild) {
     sPlatformChild = new PlatformChild();
     ClearOnShutdown(&sPlatformChild, ShutdownPhase::Shutdown);
   }
 
   SetManager(aManager);
@@ -313,9 +313,8 @@ ipc::IPCResult
 DocAccessibleChild::RecvRestoreFocus()
 {
   FocusMgr()->ForceFocusEvent();
   return IPC_OK();
 }
 
 } // namespace a11y
 } // namespace mozilla
-