зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1407810 - Make DecoderDoctorLogger::sLogState 'ReleaseAcquire' - r=jwwang
sLogState is accessed at least once for every DDLog call, even when logging is disabled, so we want it to be as quick as possible for minimal impact on most users. MozReview-Commit-ID: AMstgXmixrv --HG-- extra : rebase_source : 475b32f76d9660d03333047eb7e7add62b717a79
This commit is contained in:
Родитель
6379d18e57
Коммит
3704f8907e
|
@ -14,7 +14,7 @@
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
/* static */ Atomic<DecoderDoctorLogger::LogState>
|
||||
/* static */ Atomic<DecoderDoctorLogger::LogState, ReleaseAcquire>
|
||||
DecoderDoctorLogger::sLogState{ DecoderDoctorLogger::scDisabled };
|
||||
|
||||
/* static */ const char* DecoderDoctorLogger::sShutdownReason = nullptr;
|
||||
|
|
|
@ -346,7 +346,9 @@ private:
|
|||
// Shutdown, cannot be re-enabled.
|
||||
static constexpr LogState scShutdown = 3;
|
||||
// Current state.
|
||||
static Atomic<LogState> sLogState;
|
||||
// "ReleaseAcquire" because when changing to scEnabled, the just-created
|
||||
// sMediaLogs must be accessible to consumers that see scEnabled.
|
||||
static Atomic<LogState, ReleaseAcquire> sLogState;
|
||||
|
||||
// If non-null, reason for an abnormal shutdown.
|
||||
static const char* sShutdownReason;
|
||||
|
|
Загрузка…
Ссылка в новой задаче