зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
0cea34de7c
Коммит
afaaa019c8
|
@ -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)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче