зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1060975 - Fix bad implicit constructors in security; r=bsmith
This commit is contained in:
Родитель
4831caf277
Коммит
aafc47e9e9
|
@ -97,7 +97,7 @@ static const PLDHashTableOps gMapOps = {
|
|||
#ifdef DEBUG
|
||||
class nsAutoAtomic {
|
||||
public:
|
||||
nsAutoAtomic(Atomic<int32_t> &i)
|
||||
explicit nsAutoAtomic(Atomic<int32_t> &i)
|
||||
:mI(i) {
|
||||
mI++;
|
||||
}
|
||||
|
@ -1645,7 +1645,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
|
||||
nsUIContext(nsIDOMWindow *window);
|
||||
explicit nsUIContext(nsIDOMWindow *window);
|
||||
|
||||
protected:
|
||||
virtual ~nsUIContext();
|
||||
|
|
|
@ -35,7 +35,7 @@ class PSMContentDownloader : public nsIStreamListener
|
|||
{
|
||||
public:
|
||||
PSMContentDownloader() {NS_ASSERTION(false, "don't use this constructor."); }
|
||||
PSMContentDownloader(uint32_t type);
|
||||
explicit PSMContentDownloader(uint32_t type);
|
||||
void setSilentDownload(bool flag);
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -597,7 +597,7 @@ CreateCertErrorRunnable(CertVerifier& certVerifier,
|
|||
class CertErrorRunnableRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
CertErrorRunnableRunnable(CertErrorRunnable* certErrorRunnable)
|
||||
explicit CertErrorRunnableRunnable(CertErrorRunnable* certErrorRunnable)
|
||||
: mCertErrorRunnable(certErrorRunnable)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ class PrivateBrowsingObserver : public nsIObserver {
|
|||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
PrivateBrowsingObserver(SharedSSLState* aOwner) : mOwner(aOwner) {}
|
||||
explicit PrivateBrowsingObserver(SharedSSLState* aOwner) : mOwner(aOwner) {}
|
||||
protected:
|
||||
virtual ~PrivateBrowsingObserver() {}
|
||||
private:
|
||||
|
|
|
@ -71,7 +71,7 @@ class nsCertOverrideEntry MOZ_FINAL : public PLDHashEntryHdr
|
|||
typedef const char* KeyTypePointer;
|
||||
|
||||
// do nothing with aHost - we require mHead to be set before we're live!
|
||||
nsCertOverrideEntry(KeyTypePointer aHostWithPortUTF8)
|
||||
explicit nsCertOverrideEntry(KeyTypePointer aHostWithPortUTF8)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class nsClientAuthRememberEntry MOZ_FINAL : public PLDHashEntryHdr
|
|||
typedef const char* KeyTypePointer;
|
||||
|
||||
// do nothing with aHost - we require mHead to be set before we're live!
|
||||
nsClientAuthRememberEntry(KeyTypePointer aHostWithCertUTF8)
|
||||
explicit nsClientAuthRememberEntry(KeyTypePointer aHostWithCertUTF8)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ class nsNSSCertTrust
|
|||
public:
|
||||
nsNSSCertTrust();
|
||||
nsNSSCertTrust(unsigned int ssl, unsigned int email, unsigned int objsign);
|
||||
nsNSSCertTrust(CERTCertTrust *t);
|
||||
explicit nsNSSCertTrust(CERTCertTrust *t);
|
||||
virtual ~nsNSSCertTrust();
|
||||
|
||||
/* query */
|
||||
|
|
|
@ -16,7 +16,7 @@ public:
|
|||
NS_DECL_NSIX509CERTVALIDITY
|
||||
|
||||
nsX509CertValidity();
|
||||
nsX509CertValidity(CERTCertificate *cert);
|
||||
explicit nsX509CertValidity(CERTCertificate *cert);
|
||||
|
||||
protected:
|
||||
virtual ~nsX509CertValidity();
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
|
||||
friend class nsNSSCertificateFakeTransport;
|
||||
|
||||
nsNSSCertificate(CERTCertificate* cert, SECOidTag* evOidPolicy = nullptr);
|
||||
explicit nsNSSCertificate(CERTCertificate* cert, SECOidTag* evOidPolicy = nullptr);
|
||||
nsNSSCertificate();
|
||||
nsresult FormatUIStrings(const nsAutoString& nickname,
|
||||
nsAutoString& nickWithSerial,
|
||||
|
|
|
@ -60,7 +60,7 @@ private: \
|
|||
void operator=(const nsstype##Cleaner&); \
|
||||
nsstype *&object; \
|
||||
public: \
|
||||
nsstype##Cleaner(nsstype *&a_object) \
|
||||
explicit nsstype##Cleaner(nsstype *&a_object) \
|
||||
:object(a_object) {} \
|
||||
~nsstype##Cleaner() { \
|
||||
if (object) { \
|
||||
|
@ -80,7 +80,7 @@ private: \
|
|||
void operator=(const nsstype##Cleaner##namesuffix &); \
|
||||
nsstype *&object; \
|
||||
public: \
|
||||
nsstype##Cleaner##namesuffix(nsstype *&a_object) \
|
||||
explicit nsstype##Cleaner##namesuffix(nsstype *&a_object) \
|
||||
:object(a_object) {} \
|
||||
~nsstype##Cleaner##namesuffix() { \
|
||||
if (object) { \
|
||||
|
@ -96,7 +96,7 @@ public: \
|
|||
class CERTVerifyLogContentsCleaner
|
||||
{
|
||||
public:
|
||||
CERTVerifyLogContentsCleaner(CERTVerifyLog *&cvl);
|
||||
explicit CERTVerifyLogContentsCleaner(CERTVerifyLog *&cvl);
|
||||
~CERTVerifyLogContentsCleaner();
|
||||
private:
|
||||
CERTVerifyLog *&m_cvl;
|
||||
|
|
|
@ -558,7 +558,7 @@ nsNSSSocketInfo::SetFileDescPtr(PRFileDesc* aFilePtr)
|
|||
class PreviousCertRunnable : public SyncRunnableBase
|
||||
{
|
||||
public:
|
||||
PreviousCertRunnable(nsIInterfaceRequestor* callbacks)
|
||||
explicit PreviousCertRunnable(nsIInterfaceRequestor* callbacks)
|
||||
: mCallbacks(callbacks)
|
||||
{
|
||||
}
|
||||
|
@ -1441,7 +1441,7 @@ class PrefObserver : public nsIObserver {
|
|||
public:
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
PrefObserver(nsSSLIOLayerHelpers* aOwner) : mOwner(aOwner) {}
|
||||
explicit PrefObserver(nsSSLIOLayerHelpers* aOwner) : mOwner(aOwner) {}
|
||||
|
||||
protected:
|
||||
virtual ~PrefObserver() {}
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPK11TOKEN
|
||||
|
||||
nsPK11Token(PK11SlotInfo *slot);
|
||||
explicit nsPK11Token(PK11SlotInfo *slot);
|
||||
/* additional members */
|
||||
|
||||
protected:
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPKCS11SLOT
|
||||
|
||||
nsPKCS11Slot(PK11SlotInfo *slot);
|
||||
explicit nsPKCS11Slot(PK11SlotInfo *slot);
|
||||
|
||||
protected:
|
||||
virtual ~nsPKCS11Slot();
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIPKCS11MODULE
|
||||
|
||||
nsPKCS11Module(SECMODModule *module);
|
||||
explicit nsPKCS11Module(SECMODModule *module);
|
||||
|
||||
protected:
|
||||
virtual ~nsPKCS11Module();
|
||||
|
|
|
@ -36,7 +36,7 @@ private:
|
|||
class SmartCardMonitoringThread
|
||||
{
|
||||
public:
|
||||
SmartCardMonitoringThread(SECMODModule* module);
|
||||
explicit SmartCardMonitoringThread(SECMODModule* module);
|
||||
~SmartCardMonitoringThread();
|
||||
|
||||
nsresult Start();
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
class nsUsageArrayHelper
|
||||
{
|
||||
public:
|
||||
nsUsageArrayHelper(CERTCertificate *aCert);
|
||||
explicit nsUsageArrayHelper(CERTCertificate *aCert);
|
||||
|
||||
nsresult GetUsagesArray(const char *suffix,
|
||||
bool localOnly,
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
// This will succeed, leaving the time uninitialized:
|
||||
// Time x(Time::uninitialized);
|
||||
enum Uninitialized { uninitialized };
|
||||
Time(Uninitialized) { }
|
||||
explicit Time(Uninitialized) { }
|
||||
|
||||
bool operator==(const Time& other) const
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче