Bug 1060994 - Fix more bad implicit constructors in permission checker; r=bsmedberg
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 02 Sep 2014 18:20:38 -0400
changeset 203125 541e9d00496f8d90ba703408d75eb15e7f89da7a
parent 203124 3a575a9f118cb7bd3274124edd32edb64838b669
child 203126 41954931b34e1f113651e53154d315acd59e18c8
push id48571
push usereakhgari@mozilla.com
push dateTue, 02 Sep 2014 22:22:13 +0000
treeherdermozilla-inbound@1d4cf18b1411 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1060994
milestone35.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 1060994 - Fix more bad implicit constructors in permission checker; r=bsmedberg
extensions/cookie/nsPermissionManager.cpp
extensions/cookie/nsPermissionManager.h
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -301,17 +301,17 @@ class DeleteFromMozHostListener MOZ_FINA
 
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_MOZISTORAGESTATEMENTCALLBACK
 
   /**
    * @param aManager The owning manager.
    */
-  DeleteFromMozHostListener(nsPermissionManager* aManager);
+  explicit DeleteFromMozHostListener(nsPermissionManager* aManager);
 
 protected:
   nsRefPtr<nsPermissionManager> mManager;
 };
 
 NS_IMPL_ISUPPORTS(DeleteFromMozHostListener, mozIStorageStatementCallback)
 
 DeleteFromMozHostListener::
--- a/extensions/cookie/nsPermissionManager.h
+++ b/extensions/cookie/nsPermissionManager.h
@@ -62,17 +62,17 @@ public:
    * PermissionKey is the key used by PermissionHashKey hash table.
    *
    * NOTE: It could be implementing nsIHashable but there is no reason to worry
    * with XPCOM interfaces while we don't need to.
    */
   class PermissionKey
   {
   public:
-    PermissionKey(nsIPrincipal* aPrincipal);
+    explicit PermissionKey(nsIPrincipal* aPrincipal);
     PermissionKey(const nsACString& aHost,
                   uint32_t aAppId,
                   bool aIsInBrowserElement)
       : mHost(aHost)
       , mAppId(aAppId)
       , mIsInBrowserElement(aIsInBrowserElement)
     {
     }
@@ -104,17 +104,17 @@ public:
 
     // Dtor shouldn't be used outside of the class.
     ~PermissionKey() {};
   };
 
   class PermissionHashKey : public nsRefPtrHashKey<PermissionKey>
   {
   public:
-    PermissionHashKey(const PermissionKey* aPermissionKey)
+    explicit PermissionHashKey(const PermissionKey* aPermissionKey)
       : nsRefPtrHashKey<PermissionKey>(aPermissionKey)
     {}
 
     PermissionHashKey(const PermissionHashKey& toCopy)
       : nsRefPtrHashKey<PermissionKey>(toCopy)
       , mPermissions(toCopy.mPermissions)
     {}