зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1335595 (part 1) - Remove the profiler's ASSERT macro. r=mstange.
MOZ_ASSERT is the standard macro. --HG-- extra : rebase_source : 8aa9b96b82ff4b7ec2de4ec5c62aeb23aafea85f
This commit is contained in:
Родитель
f229e3220d
Коммит
f542865603
|
@ -329,7 +329,7 @@ Sampler::RegisterCurrentThread(const char* aName,
|
|||
if (info->ThreadId() == id && !info->IsPendingDelete()) {
|
||||
// Thread already registered. This means the first unregister will be
|
||||
// too early.
|
||||
ASSERT(false);
|
||||
MOZ_ASSERT(false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ static void* setup_atfork() {
|
|||
|
||||
struct SamplerRegistry {
|
||||
static void AddActiveSampler(Sampler *sampler) {
|
||||
ASSERT(!SamplerRegistry::sampler);
|
||||
MOZ_ASSERT(!SamplerRegistry::sampler);
|
||||
SamplerRegistry::sampler = sampler;
|
||||
}
|
||||
static void RemoveActiveSampler(Sampler *sampler) {
|
||||
|
|
|
@ -47,7 +47,7 @@ using mozilla::TimeDuration;
|
|||
// that only supports a single Sampler
|
||||
struct SamplerRegistry {
|
||||
static void AddActiveSampler(Sampler *sampler) {
|
||||
ASSERT(!SamplerRegistry::sampler);
|
||||
MOZ_ASSERT(!SamplerRegistry::sampler);
|
||||
SamplerRegistry::sampler = sampler;
|
||||
}
|
||||
static void RemoveActiveSampler(Sampler *sampler) {
|
||||
|
@ -138,7 +138,7 @@ public:
|
|||
|
||||
thread->mThread = pthread_self();
|
||||
SetThreadName();
|
||||
ASSERT(thread->mThread != kNoThread);
|
||||
MOZ_ASSERT(thread->mThread != kNoThread);
|
||||
thread->Run();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ public:
|
|||
void Start() {
|
||||
pthread_attr_t* attr_ptr = NULL;
|
||||
pthread_create(&mThread, attr_ptr, ThreadEntry, this);
|
||||
ASSERT(mThread != kNoThread);
|
||||
MOZ_ASSERT(mThread != kNoThread);
|
||||
}
|
||||
|
||||
void Join() {
|
||||
|
@ -289,13 +289,13 @@ private:
|
|||
SamplerThread* SamplerThread::mInstance = NULL;
|
||||
|
||||
void Sampler::Start() {
|
||||
ASSERT(!IsActive());
|
||||
MOZ_ASSERT(!IsActive());
|
||||
SetActive(true);
|
||||
SamplerThread::AddActiveSampler(this);
|
||||
}
|
||||
|
||||
void Sampler::Stop() {
|
||||
ASSERT(IsActive());
|
||||
MOZ_ASSERT(IsActive());
|
||||
SetActive(false);
|
||||
SamplerThread::RemoveActiveSampler(this);
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ class SamplerThread
|
|||
mInstance = new SamplerThread(sampler->interval(), sampler);
|
||||
mInstance->Start();
|
||||
} else {
|
||||
ASSERT(mInstance->mInterval == sampler->interval());
|
||||
MOZ_ASSERT(mInstance->mInterval == sampler->interval());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,13 +306,13 @@ private:
|
|||
SamplerThread* SamplerThread::mInstance = NULL;
|
||||
|
||||
void Sampler::Start() {
|
||||
ASSERT(!IsActive());
|
||||
MOZ_ASSERT(!IsActive());
|
||||
SetActive(true);
|
||||
SamplerThread::StartSampler(this);
|
||||
}
|
||||
|
||||
void Sampler::Stop() {
|
||||
ASSERT(IsActive());
|
||||
MOZ_ASSERT(IsActive());
|
||||
SetActive(false);
|
||||
SamplerThread::StopSampler();
|
||||
}
|
||||
|
|
|
@ -840,7 +840,7 @@ profiler_stop()
|
|||
|
||||
if (disableJS) {
|
||||
PseudoStack *stack = tlsPseudoStack.get();
|
||||
ASSERT(stack != nullptr);
|
||||
MOZ_ASSERT(stack != nullptr);
|
||||
stack->disableJSSampling();
|
||||
}
|
||||
|
||||
|
|
|
@ -75,8 +75,6 @@ static inline pid_t gettid()
|
|||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#define ASSERT(a) MOZ_ASSERT(a)
|
||||
|
||||
bool profiler_verbose();
|
||||
|
||||
#ifdef ANDROID
|
||||
|
|
Загрузка…
Ссылка в новой задаче