Bug 1087306 - Fix some more bad implicit constructors in accessible; r=tbsaunde
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 10 Oct 2014 17:28:35 -0400
changeset 238315 da634b282291382d6ac51f5a10ef0ce23b01d6ec
parent 238314 d7d5fdbabf904970deed8d3dbf35ac080725a0bf
child 238316 f831a50b897687731c77e084edeead81c63842bd
push id660
push userraliiev@mozilla.com
push dateWed, 18 Feb 2015 20:30:48 +0000
treeherdermozilla-release@49e493494178 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstbsaunde
bugs1087306
milestone36.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 1087306 - Fix some more bad implicit constructors in accessible; r=tbsaunde
accessible/generic/Accessible.h
accessible/generic/BaseAccessibles.h
accessible/ipc/DocAccessibleChild.h
accessible/ipc/DocAccessibleParent.h
accessible/xpcom/xpcAccessibleApplication.h
accessible/xpcom/xpcAccessibleDocument.h
accessible/xpcom/xpcAccessibleGeneric.h
accessible/xpcom/xpcAccessibleHyperText.h
accessible/xpcom/xpcAccessibleImage.h
accessible/xpcom/xpcAccessibleTable.h
accessible/xpcom/xpcAccessibleTableCell.h
--- a/accessible/generic/Accessible.h
+++ b/accessible/generic/Accessible.h
@@ -1175,17 +1175,17 @@ private:
  * This class makes sure required tasks are done before and after tree
  * mutations. Currently this only includes group info invalidation. You must
  * have an object of this class on the stack when calling methods that mutate
  * the accessible tree.
  */
 class AutoTreeMutation
 {
 public:
-  AutoTreeMutation(Accessible* aRoot, bool aInvalidationRequired = true) :
+  explicit AutoTreeMutation(Accessible* aRoot, bool aInvalidationRequired = true) :
     mInvalidationRequired(aInvalidationRequired), mRoot(aRoot)
   {
     MOZ_ASSERT(!(mRoot->mStateFlags & Accessible::eSubtreeMutating));
     mRoot->mStateFlags |= Accessible::eSubtreeMutating;
   }
   ~AutoTreeMutation()
   {
     if (mInvalidationRequired)
--- a/accessible/generic/BaseAccessibles.h
+++ b/accessible/generic/BaseAccessibles.h
@@ -113,17 +113,17 @@ protected:
 
 /**
  * A wrapper accessible around native accessible to connect it with
  * crossplatform accessible tree.
  */
 class DummyAccessible : public AccessibleWrap
 {
 public:
-  DummyAccessible(DocAccessible* aDocument = nullptr) :
+  explicit DummyAccessible(DocAccessible* aDocument = nullptr) :
     AccessibleWrap(nullptr, aDocument) { }
 
   virtual uint64_t NativeState() MOZ_OVERRIDE MOZ_FINAL;
   virtual uint64_t NativeInteractiveState() const MOZ_OVERRIDE MOZ_FINAL;
   virtual uint64_t NativeLinkState() const MOZ_OVERRIDE MOZ_FINAL;
   virtual bool NativelyUnavailable() const MOZ_OVERRIDE MOZ_FINAL;
   virtual void ApplyARIAState(uint64_t* aState) const MOZ_OVERRIDE MOZ_FINAL;
 
--- a/accessible/ipc/DocAccessibleChild.h
+++ b/accessible/ipc/DocAccessibleChild.h
@@ -17,17 +17,17 @@ class AccShowEvent;
 
   /*
    * These objects handle content side communication for an accessible document,
    * and their lifetime is the same as the document they represent.
    */
 class DocAccessibleChild : public PDocAccessibleChild
 {
 public:
-  DocAccessibleChild(DocAccessible* aDoc) :
+  explicit DocAccessibleChild(DocAccessible* aDoc) :
     mDoc(aDoc)
   { MOZ_COUNT_CTOR(DocAccessibleChild); }
   ~DocAccessibleChild()
   {
     mDoc->SetIPCDoc(nullptr);
     MOZ_COUNT_DTOR(DocAccessibleChild);
   }
 
--- a/accessible/ipc/DocAccessibleParent.h
+++ b/accessible/ipc/DocAccessibleParent.h
@@ -96,17 +96,17 @@ public:
     mAccessibles.RemoveEntry(aAccessible->ID());
   }
 
 private:
 
   class ProxyEntry : public PLDHashEntryHdr
   {
   public:
-    ProxyEntry(const void*) : mProxy(nullptr) {}
+    explicit ProxyEntry(const void*) : mProxy(nullptr) {}
     ProxyEntry(ProxyEntry&& aOther) :
       mProxy(aOther.mProxy) { aOther.mProxy = nullptr; }
     ~ProxyEntry() { delete mProxy; }
 
     typedef uint64_t KeyType;
     typedef const void* KeyTypePointer;
 
     bool KeyEquals(const void* aKey) const
--- a/accessible/xpcom/xpcAccessibleApplication.h
+++ b/accessible/xpcom/xpcAccessibleApplication.h
@@ -16,17 +16,18 @@ namespace a11y {
 
 /**
  * XPCOM wrapper around ApplicationAccessible class.
  */
 class xpcAccessibleApplication : public xpcAccessibleGeneric,
                                  public nsIAccessibleApplication
 {
 public:
-  xpcAccessibleApplication(Accessible* aIntl) : xpcAccessibleGeneric(aIntl) { }
+  explicit xpcAccessibleApplication(Accessible* aIntl) :
+    xpcAccessibleGeneric(aIntl) { }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessibleApplication
   NS_IMETHOD GetAppName(nsAString& aName) MOZ_FINAL;
   NS_IMETHOD GetAppVersion(nsAString& aVersion) MOZ_FINAL;
   NS_IMETHOD GetPlatformName(nsAString& aName) MOZ_FINAL;
   NS_IMETHOD GetPlatformVersion(nsAString& aVersion) MOZ_FINAL;
--- a/accessible/xpcom/xpcAccessibleDocument.h
+++ b/accessible/xpcom/xpcAccessibleDocument.h
@@ -19,17 +19,17 @@ namespace a11y {
 
 /**
  * XPCOM wrapper around DocAccessible class.
  */
 class xpcAccessibleDocument : public xpcAccessibleHyperText,
                               public nsIAccessibleDocument
 {
 public:
-  xpcAccessibleDocument(DocAccessible* aIntl) :
+  explicit xpcAccessibleDocument(DocAccessible* aIntl) :
     xpcAccessibleHyperText(aIntl), mCache(kDefaultCacheLength) { }
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(xpcAccessibleDocument,
                                            xpcAccessibleGeneric)
 
   // nsIAccessibleDocument
   NS_IMETHOD GetURL(nsAString& aURL) MOZ_FINAL;
--- a/accessible/xpcom/xpcAccessibleGeneric.h
+++ b/accessible/xpcom/xpcAccessibleGeneric.h
@@ -21,17 +21,17 @@ namespace a11y {
  * XPCOM wrapper around Accessible class.
  */
 class xpcAccessibleGeneric : public xpcAccessible,
                              public xpcAccessibleHyperLink,
                              public xpcAccessibleSelectable,
                              public xpcAccessibleValue
 {
 public:
-  xpcAccessibleGeneric(Accessible* aInternal) :
+  explicit xpcAccessibleGeneric(Accessible* aInternal) :
     mIntl(aInternal), mSupportedIfaces(0)
   {
     if (mIntl->IsSelect())
       mSupportedIfaces |= eSelectable;
     if (mIntl->HasNumericValue())
       mSupportedIfaces |= eValue;
     if (mIntl->IsLink())
       mSupportedIfaces |= eHyperLink;
--- a/accessible/xpcom/xpcAccessibleHyperText.h
+++ b/accessible/xpcom/xpcAccessibleHyperText.h
@@ -18,17 +18,18 @@ namespace mozilla {
 namespace a11y {
 
 class xpcAccessibleHyperText : public xpcAccessibleGeneric,
                                public nsIAccessibleText,
                                public nsIAccessibleEditableText,
                                public nsIAccessibleHyperText
 {
 public:
-  xpcAccessibleHyperText(Accessible* aIntl) : xpcAccessibleGeneric(aIntl)
+  explicit xpcAccessibleHyperText(Accessible* aIntl) :
+    xpcAccessibleGeneric(aIntl)
   {
     if (mIntl->IsHyperText() && mIntl->AsHyperText()->IsTextRole())
       mSupportedIfaces |= eText;
   }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_NSIACCESSIBLETEXT
--- a/accessible/xpcom/xpcAccessibleImage.h
+++ b/accessible/xpcom/xpcAccessibleImage.h
@@ -13,17 +13,18 @@
 
 namespace mozilla {
 namespace a11y {
 
 class xpcAccessibleImage : public xpcAccessibleGeneric,
                            public nsIAccessibleImage
 {
 public:
-  xpcAccessibleImage(Accessible* aIntl) : xpcAccessibleGeneric(aIntl) { }
+  explicit xpcAccessibleImage(Accessible* aIntl) :
+    xpcAccessibleGeneric(aIntl) { }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_IMETHOD GetImagePosition(uint32_t aCoordType,
                               int32_t* aX, int32_t* aY) MOZ_FINAL;
   NS_IMETHOD GetImageSize(int32_t* aWidth, int32_t* aHeight) MOZ_FINAL;
 
 protected:
--- a/accessible/xpcom/xpcAccessibleTable.h
+++ b/accessible/xpcom/xpcAccessibleTable.h
@@ -15,17 +15,18 @@ namespace a11y {
 
 /**
  * XPCOM wrapper around TableAccessible class.
  */
 class xpcAccessibleTable : public xpcAccessibleGeneric,
                            public nsIAccessibleTable
 {
 public:
-  xpcAccessibleTable(Accessible* aIntl) : xpcAccessibleGeneric(aIntl) { }
+  explicit xpcAccessibleTable(Accessible* aIntl) :
+    xpcAccessibleGeneric(aIntl) { }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessibleTable
   NS_IMETHOD GetCaption(nsIAccessible** aCaption) MOZ_FINAL;
   NS_IMETHOD GetSummary(nsAString& aSummary) MOZ_FINAL;
   NS_IMETHOD GetColumnCount(int32_t* aColumnCount) MOZ_FINAL;
   NS_IMETHOD GetRowCount(int32_t* aRowCount) MOZ_FINAL;
--- a/accessible/xpcom/xpcAccessibleTableCell.h
+++ b/accessible/xpcom/xpcAccessibleTableCell.h
@@ -16,17 +16,18 @@ namespace a11y {
 
 /**
  * XPCOM wrapper around TableAccessibleCell class.
  */
 class xpcAccessibleTableCell : public xpcAccessibleHyperText,
                                public nsIAccessibleTableCell
 {
 public:
-  xpcAccessibleTableCell(Accessible* aIntl) : xpcAccessibleHyperText(aIntl) { }
+  explicit xpcAccessibleTableCell(Accessible* aIntl) :
+    xpcAccessibleHyperText(aIntl) { }
 
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIAccessibleTableCell
   NS_IMETHOD GetTable(nsIAccessibleTable** aTable) MOZ_FINAL;
   NS_IMETHOD GetColumnIndex(int32_t* aColIdx) MOZ_FINAL;
   NS_IMETHOD GetRowIndex(int32_t* aRowIdx) MOZ_FINAL;
   NS_IMETHOD GetColumnExtent(int32_t* aExtent) MOZ_FINAL;