Bug 1575847: Do a racy early return from profiler_get_backtrace if the profiler isn't active. r=mstange

Differential Revision: https://phabricator.services.mozilla.com/D43069

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Bas Schouten 2019-08-22 22:24:52 +00:00
Родитель 0cea34de7c
Коммит afaaa019c8
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -3928,6 +3928,11 @@ double profiler_time() {
UniqueProfilerBacktrace profiler_get_backtrace() {
MOZ_RELEASE_ASSERT(CorePS::Exists());
// Fast racy early return.
if (!profiler_is_active()) {
return nullptr;
}
PSAutoLock lock(gPSMutex);
if (!ActivePS::Exists(lock) || ActivePS::FeaturePrivacy(lock)) {