зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1563046: Move operator LogModule* out of line in debug builds. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D36675 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d73e20e33d
Коммит
17b36a1a90
|
@ -92,6 +92,15 @@
|
|||
# define MOZ_NEVER_INLINE /* no support */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* MOZ_NEVER_INLINE_DEBUG is a macro which expands to MOZ_NEVER_INLINE
|
||||
* in debug builds, and nothing in opt builds.
|
||||
*/
|
||||
#if defined(DEBUG)
|
||||
# define MOZ_NEVER_INLINE_DEBUG MOZ_NEVER_INLINE
|
||||
#else
|
||||
# define MOZ_NEVER_INLINE_DEBUG /* don't inline in opt builds */
|
||||
#endif
|
||||
/*
|
||||
* MOZ_NORETURN, specified at the start of a function declaration, indicates
|
||||
* that the given function does not return. (The function definition does not
|
||||
|
|
|
@ -168,7 +168,7 @@ class LazyLogModule final {
|
|||
explicit constexpr LazyLogModule(const char* aLogName)
|
||||
: mLogName(aLogName), mLog(nullptr) {}
|
||||
|
||||
operator LogModule*() {
|
||||
MOZ_NEVER_INLINE_DEBUG operator LogModule*() {
|
||||
// NB: The use of an atomic makes the reading and assignment of mLog
|
||||
// thread-safe. There is a small chance that mLog will be set more
|
||||
// than once, but that's okay as it will be set to the same LogModule
|
||||
|
|
Загрузка…
Ссылка в новой задаче