summaryrefslogtreecommitdiffstats
path: root/chromium/base/lazy_instance.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/lazy_instance.h')
-rw-r--r--chromium/base/lazy_instance.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/chromium/base/lazy_instance.h b/chromium/base/lazy_instance.h
index 3935780a55b..05a7c5d81ec 100644
--- a/chromium/base/lazy_instance.h
+++ b/chromium/base/lazy_instance.h
@@ -57,7 +57,9 @@ namespace base {
template <typename Type>
struct DefaultLazyInstanceTraits {
static const bool kRegisterOnExit = true;
+#ifndef NDEBUG
static const bool kAllowedToAccessOnNonjoinableThread = false;
+#endif
static Type* New(void* instance) {
DCHECK_EQ(reinterpret_cast<uintptr_t>(instance) & (ALIGNOF(Type) - 1), 0u)
@@ -89,7 +91,9 @@ namespace internal {
template <typename Type>
struct LeakyLazyInstanceTraits {
static const bool kRegisterOnExit = false;
+#ifndef NDEBUG
static const bool kAllowedToAccessOnNonjoinableThread = true;
+#endif
static Type* New(void* instance) {
ANNOTATE_SCOPED_MEMORY_LEAK;