Bug 1083101 - Static analysis fix on a CLOSED TREE. r=me

This commit is contained in:
Nicolas Silva 2015-08-27 15:51:42 +02:00
parent e16f3755af
commit 6d0161ea44
3 changed files with 5 additions and 5 deletions

View File

@ -118,7 +118,7 @@ class EventObject;
class SetEventTask : public Task
{
public:
SetEventTask(MultiThreadedTaskQueue* aQueue, SyncObject* aStart = nullptr, SyncObject* aCompletion = nullptr);
explicit SetEventTask(MultiThreadedTaskQueue* aQueue, SyncObject* aStart = nullptr, SyncObject* aCompletion = nullptr);
~SetEventTask();
@ -206,7 +206,7 @@ private:
/// RAII helper.
struct MutexAutoLock {
MutexAutoLock(Mutex* aMutex) : mMutex(aMutex) { mMutex->Lock(); }
explicit MutexAutoLock(Mutex* aMutex) : mMutex(aMutex) { mMutex->Lock(); }
~MutexAutoLock() { mMutex->Unlock(); }
protected:
Mutex* mMutex;
@ -222,7 +222,7 @@ public:
void Run();
protected:
WorkerThread(MultiThreadedTaskQueue* aTaskQueue);
explicit WorkerThread(MultiThreadedTaskQueue* aTaskQueue);
MultiThreadedTaskQueue* mQueue;
};

View File

@ -15,7 +15,7 @@ void* ThreadCallback(void* threadData);
class WorkerThreadPosix : public WorkerThread {
public:
WorkerThreadPosix(MultiThreadedTaskQueue* aTaskQueue)
explicit WorkerThreadPosix(MultiThreadedTaskQueue* aTaskQueue)
: WorkerThread(aTaskQueue)
{
pthread_create(&mThread, nullptr, ThreadCallback, static_cast<WorkerThread*>(this));

View File

@ -15,7 +15,7 @@ DWORD __stdcall ThreadCallback(void* threadData);
class WorkerThreadWin32 : public WorkerThread {
public:
WorkerThreadWin32(MultiThreadedTaskQueue* aTaskQueue)
explicit WorkerThreadWin32(MultiThreadedTaskQueue* aTaskQueue)
: WorkerThread(aTaskQueue)
{
mThread = ::CreateThread(nullptr, 0, ThreadCallback, static_cast<WorkerThread*>(this), 0, nullptr);