Bug 1053603 - Fix some more bad implicit constructors in the IPC code; r=bent

This commit is contained in:
Ehsan Akhgari 2014-08-07 21:18:59 -04:00
parent d278d985d3
commit 60ccfd2346
6 changed files with 8 additions and 8 deletions

View File

@ -32,7 +32,7 @@ class AtExitManager {
// even if one already exists. This should only be used for testing!
// AtExitManagers are kept on a global stack, and it will be removed during
// destruction. This allows you to shadow another AtExitManager.
AtExitManager(bool shadow);
explicit AtExitManager(bool shadow);
public:
typedef void (*AtExitCallbackType)(void*);

View File

@ -44,7 +44,7 @@ class ChildProcessHost :
class Iterator {
public:
Iterator();
Iterator(ProcessType type);
explicit Iterator(ProcessType type);
ChildProcessHost* operator->() { return *iterator_; }
ChildProcessHost* operator*() { return *iterator_; }
ChildProcessHost* operator++();
@ -101,7 +101,7 @@ class ChildProcessHost :
// calling the subclass' implementation.
class ListenerHook : public IPC::Channel::Listener {
public:
ListenerHook(ChildProcessHost* host);
explicit ListenerHook(ChildProcessHost* host);
virtual void OnMessageReceived(const IPC::Message& msg);
virtual void OnChannelConnected(int32_t peer_pid);
virtual void OnChannelError();

View File

@ -91,7 +91,7 @@ class ChildProcessInfo {
}
// Derived objects need to use this constructor so we know what type we are.
ChildProcessInfo(ProcessType type);
explicit ChildProcessInfo(ProcessType type);
private:
ProcessType type_;

View File

@ -49,13 +49,13 @@ public:
* CrossProcessMutex
* @param name A name which can reference this lock (currently unused)
**/
CrossProcessMutex(const char* aName);
explicit CrossProcessMutex(const char* aName);
/**
* CrossProcessMutex
* @param handle A handle of an existing cross process mutex that can be
* opened.
*/
CrossProcessMutex(CrossProcessMutexHandle aHandle);
explicit CrossProcessMutex(CrossProcessMutexHandle aHandle);
/**
* ~CrossProcessMutex

View File

@ -24,7 +24,7 @@ class CloseFileRunnable MOZ_FINAL : public nsIRunnable
FileDescriptor mFileDescriptor;
public:
CloseFileRunnable(const FileDescriptor& aFileDescriptor)
explicit CloseFileRunnable(const FileDescriptor& aFileDescriptor)
#ifdef DEBUG
;
#else

View File

@ -30,7 +30,7 @@ public:
{
}
SharedMemoryBasic(const Handle& aHandle)
explicit SharedMemoryBasic(const Handle& aHandle)
: mSharedMemory(aHandle, false)
{
}