зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1839531 - Don't check the pref javascript.options.asyncstack during shutdown. r=canaltinova
Getting a preference will always fail during shutdown, so avoid doing it. The goal here is to avoid what is perhaps the most common source of warning spam in logs in debug builds. Differential Revision: https://phabricator.services.mozilla.com/D181585
This commit is contained in:
Родитель
3424c000a7
Коммит
a5b49717a3
|
@ -2704,7 +2704,8 @@ struct PreRecordedMetaInformation {
|
|||
// This function should be called out of the profiler lock.
|
||||
// It gathers non-trivial data that doesn't require the profiler to stop, or for
|
||||
// which the request could theoretically deadlock if the profiler is locked.
|
||||
static PreRecordedMetaInformation PreRecordMetaInformation() {
|
||||
static PreRecordedMetaInformation PreRecordMetaInformation(
|
||||
bool aShutdown = false) {
|
||||
MOZ_ASSERT(!PSAutoLock::IsLockedOnCurrentThread());
|
||||
|
||||
PreRecordedMetaInformation info = {}; // Aggregate-init all fields.
|
||||
|
@ -2719,7 +2720,8 @@ static PreRecordedMetaInformation PreRecordMetaInformation() {
|
|||
return info;
|
||||
}
|
||||
|
||||
info.mAsyncStacks = Preferences::GetBool("javascript.options.asyncstack");
|
||||
info.mAsyncStacks =
|
||||
!aShutdown && Preferences::GetBool("javascript.options.asyncstack");
|
||||
|
||||
nsresult res;
|
||||
|
||||
|
@ -5331,7 +5333,8 @@ void profiler_shutdown(IsFastShutdown aIsFastShutdown) {
|
|||
}
|
||||
invoke_profiler_state_change_callbacks(ProfilingState::ShuttingDown);
|
||||
|
||||
const auto preRecordedMetaInformation = PreRecordMetaInformation();
|
||||
const auto preRecordedMetaInformation =
|
||||
PreRecordMetaInformation(/* aShutdown = */ true);
|
||||
|
||||
ProfilerParent::ProfilerWillStopIfStarted();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче