Bug 1453795 - Gecko Profiler - Initialize member fields in classes/ structures. r=mstange

This commit is contained in:
Andi-Bogdan Postelnicu 2018-06-13 22:36:24 +03:00
Родитель df966c5c8c
Коммит b5f26d899f
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -159,12 +159,14 @@ ThreadEntry(void* aArg)
return nullptr;
}
SamplerThread::SamplerThread(PSLockRef aLock, uint32_t aActivityGeneration,
SamplerThread::SamplerThread(PSLockRef aLock,
uint32_t aActivityGeneration,
double aIntervalMilliseconds)
: Sampler(aLock)
, mActivityGeneration(aActivityGeneration)
, mIntervalMicroseconds(
std::max(1, int(floor(aIntervalMilliseconds * 1000 + 0.5))))
, mThread{nullptr}
{
pthread_attr_t* attr_ptr = nullptr;
if (pthread_create(&mThread, attr_ptr, ThreadEntry, this) != 0) {