Bug 1496623 - Rename and comment GeckoProfilerThread::installed() r=njn

--HG--
extra : rebase_source : 2478d8e26f702c9bdbd933a18e36df5232353dc8
extra : histedit_source : 95df9357a34d2c3b1a96856d2df0f63de407e4cc
This commit is contained in:
Paul Bone 2018-10-05 10:52:43 +10:00
Родитель 2a3a5dac4b
Коммит 6485ea0dfe
4 изменённых файлов: 11 добавлений и 7 удалений

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

@ -474,12 +474,16 @@ class GeckoProfilerThread
public:
GeckoProfilerThread();
uint32_t stackPointer() { MOZ_ASSERT(installed()); return profilingStack_->stackPointer; }
uint32_t stackPointer() { MOZ_ASSERT(infraInstalled()); return profilingStack_->stackPointer; }
ProfilingStackFrame* stack() { return profilingStack_->frames; }
ProfilingStack* getProfilingStack() { return profilingStack_; }
/* management of whether instrumentation is on or off */
bool installed() { return profilingStack_ != nullptr; }
/*
* True if the profiler infrastructure is setup. Should be true in builds
* that include profiler support except during early startup or late
* shutdown. Unrelated to the presence of the Gecko Profiler addon.
*/
bool infraInstalled() { return profilingStack_ != nullptr; }
void setProfilingStack(ProfilingStack* profilingStack);
void trace(JSTracer* trc);

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

@ -3820,7 +3820,7 @@ EvalInContext(JSContext* cx, unsigned argc, Value* vp)
static bool
EnsureGeckoProfilingStackInstalled(JSContext* cx, ShellContext* sc)
{
if (cx->geckoProfiler().installed()) {
if (cx->geckoProfiler().infraInstalled()) {
MOZ_ASSERT(sc->geckoProfilingStack);
return true;
}

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

@ -53,7 +53,7 @@ GeckoProfilerEntryMarker::GeckoProfilerEntryMarker(JSContext* cx,
: profiler_(&cx->geckoProfiler())
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
if (MOZ_LIKELY(!profiler_->installed())) {
if (MOZ_LIKELY(!profiler_->infraInstalled())) {
profiler_ = nullptr;
return;
}
@ -88,7 +88,7 @@ AutoGeckoProfilerEntry::AutoGeckoProfilerEntry(JSContext* cx, const char* label,
: profiler_(&cx->geckoProfiler())
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
if (MOZ_LIKELY(!profiler_->installed())) {
if (MOZ_LIKELY(!profiler_->infraInstalled())) {
profiler_ = nullptr;
return;
}

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

@ -85,7 +85,7 @@ void
GeckoProfilerRuntime::enable(bool enabled)
{
JSContext* cx = rt->mainContextFromAnyThread();
MOZ_ASSERT(cx->geckoProfiler().installed());
MOZ_ASSERT(cx->geckoProfiler().infraInstalled());
if (enabled_ == enabled) {
return;