Bug 1061061 - Fix more bad implicit constructors in misc. code; r=bsmedberg
This commit is contained in:
@@ -41,7 +41,7 @@ public:
|
|||||||
NS_DECL_THREADSAFE_ISUPPORTS
|
NS_DECL_THREADSAFE_ISUPPORTS
|
||||||
NS_DECL_NSIAUTHMODULE
|
NS_DECL_NSIAUTHMODULE
|
||||||
|
|
||||||
nsAuthGSSAPI(pType package);
|
explicit nsAuthGSSAPI(pType package);
|
||||||
|
|
||||||
static void Shutdown();
|
static void Shutdown();
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ public:
|
|||||||
NS_DECL_THREADSAFE_ISUPPORTS
|
NS_DECL_THREADSAFE_ISUPPORTS
|
||||||
NS_DECL_NSIZIPENTRY
|
NS_DECL_NSIZIPENTRY
|
||||||
|
|
||||||
nsJARItem(nsZipItem* aZipItem);
|
explicit nsJARItem(nsZipItem* aZipItem);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ~nsJARItem() {}
|
virtual ~nsJARItem() {}
|
||||||
@@ -167,7 +167,7 @@ public:
|
|||||||
NS_DECL_THREADSAFE_ISUPPORTS
|
NS_DECL_THREADSAFE_ISUPPORTS
|
||||||
NS_DECL_NSIUTF8STRINGENUMERATOR
|
NS_DECL_NSIUTF8STRINGENUMERATOR
|
||||||
|
|
||||||
nsJAREnumerator(nsZipFind *aFind) : mFind(aFind), mName(nullptr) {
|
explicit nsJAREnumerator(nsZipFind *aFind) : mFind(aFind), mName(nullptr) {
|
||||||
NS_ASSERTION(mFind, "nsJAREnumerator: Missing zipFind.");
|
NS_ASSERTION(mFind, "nsJAREnumerator: Missing zipFind.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public:
|
|||||||
mLevel = 6;
|
mLevel = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsDeflateConverter(int32_t level)
|
explicit nsDeflateConverter(int32_t level)
|
||||||
{
|
{
|
||||||
mLevel = level;
|
mLevel = level;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public:
|
|||||||
ValueObserverHashKey(const char *aPref, PrefChangedFunc aCallback) :
|
ValueObserverHashKey(const char *aPref, PrefChangedFunc aCallback) :
|
||||||
mPrefName(aPref), mCallback(aCallback) { }
|
mPrefName(aPref), mCallback(aCallback) { }
|
||||||
|
|
||||||
ValueObserverHashKey(const ValueObserverHashKey *aOther) :
|
explicit ValueObserverHashKey(const ValueObserverHashKey *aOther) :
|
||||||
mPrefName(aOther->mPrefName), mCallback(aOther->mCallback)
|
mPrefName(aOther->mPrefName), mCallback(aOther->mCallback)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class PrefCallback : public PLDHashEntryHdr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Copy constructor needs to be explicit or the linker complains.
|
// Copy constructor needs to be explicit or the linker complains.
|
||||||
PrefCallback(const PrefCallback *&aCopy)
|
explicit PrefCallback(const PrefCallback *&aCopy)
|
||||||
: mDomain(aCopy->mDomain),
|
: mDomain(aCopy->mDomain),
|
||||||
mBranch(aCopy->mBranch),
|
mBranch(aCopy->mBranch),
|
||||||
mWeakRef(aCopy->mWeakRef),
|
mWeakRef(aCopy->mWeakRef),
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public:
|
|||||||
virtual nsresult Shutdown();
|
virtual nsresult Shutdown();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsProfileDirServiceProvider(bool aNotifyObservers = true);
|
explicit nsProfileDirServiceProvider(bool aNotifyObservers = true);
|
||||||
virtual ~nsProfileDirServiceProvider();
|
virtual ~nsProfileDirServiceProvider();
|
||||||
|
|
||||||
nsresult Initialize();
|
nsresult Initialize();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ struct Connection
|
|||||||
PRFileDesc *mSocket;
|
PRFileDesc *mSocket;
|
||||||
char mByte;
|
char mByte;
|
||||||
|
|
||||||
Connection(PRFileDesc *aSocket);
|
explicit Connection(PRFileDesc *aSocket);
|
||||||
~Connection();
|
~Connection();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ public:
|
|||||||
NS_DECL_NSIURLCLASSIFIERCALLBACK
|
NS_DECL_NSIURLCLASSIFIERCALLBACK
|
||||||
|
|
||||||
// Constructor and destructor
|
// Constructor and destructor
|
||||||
PendingDBLookup(PendingLookup* aPendingLookup);
|
explicit PendingDBLookup(PendingLookup* aPendingLookup);
|
||||||
|
|
||||||
// Look up the given URI in the safebrowsing DBs, optionally on both the allow
|
// Look up the given URI in the safebrowsing DBs, optionally on both the allow
|
||||||
// list and the blocklist. If there is a match, call
|
// list and the blocklist. If there is a match, call
|
||||||
|
|||||||
@@ -92,10 +92,10 @@ struct ScopedArrayBufferContentsTraits {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ScopedArrayBufferContents: public Scoped<ScopedArrayBufferContentsTraits> {
|
struct ScopedArrayBufferContents: public Scoped<ScopedArrayBufferContentsTraits> {
|
||||||
ScopedArrayBufferContents(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM):
|
explicit ScopedArrayBufferContents(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM):
|
||||||
Scoped<ScopedArrayBufferContentsTraits>(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT)
|
Scoped<ScopedArrayBufferContentsTraits>(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT)
|
||||||
{ }
|
{ }
|
||||||
ScopedArrayBufferContents(const ArrayBufferContents& v
|
explicit ScopedArrayBufferContents(const ArrayBufferContents& v
|
||||||
MOZ_GUARD_OBJECT_NOTIFIER_PARAM):
|
MOZ_GUARD_OBJECT_NOTIFIER_PARAM):
|
||||||
Scoped<ScopedArrayBufferContentsTraits>(v MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)
|
Scoped<ScopedArrayBufferContentsTraits>(v MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)
|
||||||
{ }
|
{ }
|
||||||
@@ -171,7 +171,7 @@ public:
|
|||||||
* @param aStartDate The instant at which the operation was
|
* @param aStartDate The instant at which the operation was
|
||||||
* requested. Used to collect Telemetry statistics.
|
* requested. Used to collect Telemetry statistics.
|
||||||
*/
|
*/
|
||||||
AbstractResult(TimeStamp aStartDate)
|
explicit AbstractResult(TimeStamp aStartDate)
|
||||||
: mStartDate(aStartDate)
|
: mStartDate(aStartDate)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
@@ -277,7 +277,7 @@ AbstractResult::GetResult(JSContext *cx, JS::MutableHandleValue aResult)
|
|||||||
class StringResult MOZ_FINAL : public AbstractResult
|
class StringResult MOZ_FINAL : public AbstractResult
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StringResult(TimeStamp aStartDate)
|
explicit StringResult(TimeStamp aStartDate)
|
||||||
: AbstractResult(aStartDate)
|
: AbstractResult(aStartDate)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -328,7 +328,7 @@ StringResult::GetCacheableResult(JSContext* cx, JS::MutableHandleValue aResult)
|
|||||||
class TypedArrayResult MOZ_FINAL : public AbstractResult
|
class TypedArrayResult MOZ_FINAL : public AbstractResult
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TypedArrayResult(TimeStamp aStartDate)
|
explicit TypedArrayResult(TimeStamp aStartDate)
|
||||||
: AbstractResult(aStartDate)
|
: AbstractResult(aStartDate)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ private:
|
|||||||
nsRefPtr<nsAppStartup> mService;
|
nsRefPtr<nsAppStartup> mService;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
nsAppExitEvent(nsAppStartup *service) : mService(service) {}
|
explicit nsAppExitEvent(nsAppStartup *service) : mService(service) {}
|
||||||
|
|
||||||
NS_IMETHOD Run() {
|
NS_IMETHOD Run() {
|
||||||
// Tell the appshell to exit
|
// Tell the appshell to exit
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ template<class EntryType>
|
|||||||
class AutoHashtable : public nsTHashtable<EntryType>
|
class AutoHashtable : public nsTHashtable<EntryType>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AutoHashtable(uint32_t initLength = PL_DHASH_DEFAULT_INITIAL_LENGTH);
|
explicit AutoHashtable(uint32_t initLength = PL_DHASH_DEFAULT_INITIAL_LENGTH);
|
||||||
typedef bool (*ReflectEntryFunc)(EntryType *entry, JSContext *cx, JS::Handle<JSObject*> obj);
|
typedef bool (*ReflectEntryFunc)(EntryType *entry, JSContext *cx, JS::Handle<JSObject*> obj);
|
||||||
bool ReflectIntoJS(ReflectEntryFunc entryFunc, JSContext *cx, JS::Handle<JSObject*> obj);
|
bool ReflectIntoJS(ReflectEntryFunc entryFunc, JSContext *cx, JS::Handle<JSObject*> obj);
|
||||||
private:
|
private:
|
||||||
@@ -306,7 +306,7 @@ class TelemetryIOInterposeObserver : public IOInterposeObserver
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TelemetryIOInterposeObserver(nsIFile* aXreDir);
|
explicit TelemetryIOInterposeObserver(nsIFile* aXreDir);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of Observe that records statistics of all
|
* An implementation of Observe that records statistics of all
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace safebrowsing {
|
|||||||
// new hashes.
|
// new hashes.
|
||||||
class TableUpdate {
|
class TableUpdate {
|
||||||
public:
|
public:
|
||||||
TableUpdate(const nsACString& aTable)
|
explicit TableUpdate(const nsACString& aTable)
|
||||||
: mTable(aTable), mLocalUpdate(false) {}
|
: mTable(aTable), mLocalUpdate(false) {}
|
||||||
const nsCString& TableName() const { return mTable; }
|
const nsCString& TableName() const { return mTable; }
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class UrlClassifierDBServiceWorkerProxy MOZ_FINAL :
|
|||||||
public nsIUrlClassifierDBServiceWorker
|
public nsIUrlClassifierDBServiceWorker
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UrlClassifierDBServiceWorkerProxy(nsIUrlClassifierDBServiceWorker* aTarget)
|
explicit UrlClassifierDBServiceWorkerProxy(nsIUrlClassifierDBServiceWorker* aTarget)
|
||||||
: mTarget(aTarget)
|
: mTarget(aTarget)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ class UrlClassifierLookupCallbackProxy MOZ_FINAL :
|
|||||||
public nsIUrlClassifierLookupCallback
|
public nsIUrlClassifierLookupCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UrlClassifierLookupCallbackProxy(nsIUrlClassifierLookupCallback* aTarget)
|
explicit UrlClassifierLookupCallbackProxy(nsIUrlClassifierLookupCallback* aTarget)
|
||||||
: mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierLookupCallback>(aTarget))
|
: mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierLookupCallback>(aTarget))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ private:
|
|||||||
class UrlClassifierCallbackProxy MOZ_FINAL : public nsIUrlClassifierCallback
|
class UrlClassifierCallbackProxy MOZ_FINAL : public nsIUrlClassifierCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UrlClassifierCallbackProxy(nsIUrlClassifierCallback* aTarget)
|
explicit UrlClassifierCallbackProxy(nsIUrlClassifierCallback* aTarget)
|
||||||
: mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierCallback>(aTarget))
|
: mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierCallback>(aTarget))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ class UrlClassifierUpdateObserverProxy MOZ_FINAL :
|
|||||||
public nsIUrlClassifierUpdateObserver
|
public nsIUrlClassifierUpdateObserver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UrlClassifierUpdateObserverProxy(nsIUrlClassifierUpdateObserver* aTarget)
|
explicit UrlClassifierUpdateObserverProxy(nsIUrlClassifierUpdateObserver* aTarget)
|
||||||
: mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierUpdateObserver>(aTarget))
|
: mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierUpdateObserver>(aTarget))
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ static const int kMagicChildCrashReportFd = 4;
|
|||||||
static Mutex* dumpMapLock;
|
static Mutex* dumpMapLock;
|
||||||
struct ChildProcessData : public nsUint32HashKey
|
struct ChildProcessData : public nsUint32HashKey
|
||||||
{
|
{
|
||||||
ChildProcessData(KeyTypePointer aKey)
|
explicit ChildProcessData(KeyTypePointer aKey)
|
||||||
: nsUint32HashKey(aKey)
|
: nsUint32HashKey(aKey)
|
||||||
, sequence(0)
|
, sequence(0)
|
||||||
#ifdef MOZ_CRASHREPORTER_INJECTOR
|
#ifdef MOZ_CRASHREPORTER_INJECTOR
|
||||||
@@ -323,7 +323,7 @@ static nsIThread* sInjectorThread;
|
|||||||
class ReportInjectedCrash : public nsRunnable
|
class ReportInjectedCrash : public nsRunnable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ReportInjectedCrash(uint32_t pid) : mPID(pid) { }
|
explicit ReportInjectedCrash(uint32_t pid) : mPID(pid) { }
|
||||||
|
|
||||||
NS_IMETHOD Run();
|
NS_IMETHOD Run();
|
||||||
|
|
||||||
@@ -1710,7 +1710,7 @@ class DelayedNote
|
|||||||
DelayedNote(const nsACString& aKey, const nsACString& aData)
|
DelayedNote(const nsACString& aKey, const nsACString& aData)
|
||||||
: mKey(aKey), mData(aData), mType(Annotation) {}
|
: mKey(aKey), mData(aData), mType(Annotation) {}
|
||||||
|
|
||||||
DelayedNote(const nsACString& aData)
|
explicit DelayedNote(const nsACString& aData)
|
||||||
: mData(aData), mType(AppNote) {}
|
: mData(aData), mType(AppNote) {}
|
||||||
|
|
||||||
void Run()
|
void Run()
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ private:
|
|||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_NSISIMPLEENUMERATOR
|
NS_DECL_NSISIMPLEENUMERATOR
|
||||||
|
|
||||||
ProfileEnumerator(nsToolkitProfile *first)
|
explicit ProfileEnumerator(nsToolkitProfile *first)
|
||||||
{ mCurrent = first; }
|
{ mCurrent = first; }
|
||||||
private:
|
private:
|
||||||
~ProfileEnumerator() { }
|
~ProfileEnumerator() { }
|
||||||
|
|||||||
@@ -1330,7 +1330,7 @@ public:
|
|||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_NSIFACTORY
|
NS_DECL_NSIFACTORY
|
||||||
|
|
||||||
nsSingletonFactory(nsISupports* aSingleton);
|
explicit nsSingletonFactory(nsISupports* aSingleton);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~nsSingletonFactory() { }
|
~nsSingletonFactory() { }
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public:
|
|||||||
nsCString mStdout;
|
nsCString mStdout;
|
||||||
nsCString mStderr;
|
nsCString mStderr;
|
||||||
|
|
||||||
Subprocess(const char* aTestName) {
|
explicit Subprocess(const char* aTestName) {
|
||||||
// set up stdio redirection
|
// set up stdio redirection
|
||||||
PRFileDesc* readStdin; PRFileDesc* writeStdin;
|
PRFileDesc* readStdin; PRFileDesc* writeStdin;
|
||||||
PRFileDesc* readStdout; PRFileDesc* writeStdout;
|
PRFileDesc* readStdout; PRFileDesc* writeStdout;
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ using namespace mozilla;
|
|||||||
class nsSiteWindow : public nsIEmbeddingSiteWindow
|
class nsSiteWindow : public nsIEmbeddingSiteWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
nsSiteWindow(nsContentTreeOwner *aAggregator);
|
explicit nsSiteWindow(nsContentTreeOwner *aAggregator);
|
||||||
virtual ~nsSiteWindow();
|
virtual ~nsSiteWindow();
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public:
|
|||||||
NS_DECL_NSIWINDOWPROVIDER
|
NS_DECL_NSIWINDOWPROVIDER
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsContentTreeOwner(bool fPrimary);
|
explicit nsContentTreeOwner(bool fPrimary);
|
||||||
virtual ~nsContentTreeOwner();
|
virtual ~nsContentTreeOwner();
|
||||||
|
|
||||||
void XULWindow(nsXULWindow* aXULWindow);
|
void XULWindow(nsXULWindow* aXULWindow);
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ namespace mozilla {
|
|||||||
class WebShellWindowTimerCallback MOZ_FINAL : public nsITimerCallback
|
class WebShellWindowTimerCallback MOZ_FINAL : public nsITimerCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WebShellWindowTimerCallback(nsWebShellWindow* aWindow)
|
explicit WebShellWindowTimerCallback(nsWebShellWindow* aWindow)
|
||||||
: mWindow(aWindow)
|
: mWindow(aWindow)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class nsWebShellWindow MOZ_FINAL : public nsXULWindow,
|
|||||||
public nsIWidgetListener
|
public nsIWidgetListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
nsWebShellWindow(uint32_t aChromeFlags);
|
explicit nsWebShellWindow(uint32_t aChromeFlags);
|
||||||
|
|
||||||
// nsISupports interface...
|
// nsISupports interface...
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ protected:
|
|||||||
PAD_SIZE = 0x4
|
PAD_SIZE = 0x4
|
||||||
};
|
};
|
||||||
|
|
||||||
nsXULWindow(uint32_t aChromeFlags);
|
explicit nsXULWindow(uint32_t aChromeFlags);
|
||||||
virtual ~nsXULWindow();
|
virtual ~nsXULWindow();
|
||||||
|
|
||||||
NS_IMETHOD EnsureChromeTreeOwner();
|
NS_IMETHOD EnsureChromeTreeOwner();
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ protected:
|
|||||||
nsIInterfaceRequestor* mRequestor; // WEAK
|
nsIInterfaceRequestor* mRequestor; // WEAK
|
||||||
nsCOMPtr<nsIRDFResource> mDirectory;
|
nsCOMPtr<nsIRDFResource> mDirectory;
|
||||||
|
|
||||||
nsHTTPIndex(nsIInterfaceRequestor* aRequestor);
|
explicit nsHTTPIndex(nsIInterfaceRequestor* aRequestor);
|
||||||
nsresult CommonInit(void);
|
nsresult CommonInit(void);
|
||||||
nsresult Init(nsIURI* aBaseURL);
|
nsresult Init(nsIURI* aBaseURL);
|
||||||
void GetDestination(nsIRDFResource* r, nsXPIDLCString& dest);
|
void GetDestination(nsIRDFResource* r, nsXPIDLCString& dest);
|
||||||
|
|||||||
Reference in New Issue
Block a user