From 618c28bbdd5881ad376f245cffc15b48c1905221 Mon Sep 17 00:00:00 2001 From: Jonathan Watt Date: Fri, 19 Feb 2016 12:57:42 +0000 Subject: [PATCH] Bug 1248843 - Make it clearer that DebugOnly uses up space even in optimized, non-DEBUG builds. r=Waldo --- mfbt/DebugOnly.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mfbt/DebugOnly.h b/mfbt/DebugOnly.h index 451d9bc3738..3190107958c 100644 --- a/mfbt/DebugOnly.h +++ b/mfbt/DebugOnly.h @@ -30,8 +30,9 @@ namespace mozilla { * DebugOnly instances can only be coerced to T in debug builds. In release * builds they don't have a value, so type coercion is not well defined. * - * Note that DebugOnly instances still take up one byte of space, plus padding, - * when used as members of structs. + * NOTE! DebugOnly instances still take up one byte of space, plus padding, even + * in optimized, non-DEBUG builds. Don't use DebugOnly for struct/class members + * unless that really doesn't matter to you. */ template class DebugOnly