# HG changeset patch # User Sylvestre Ledru # Date 1522921343 -7200 # Thu Apr 05 11:42:23 2018 +0200 # Node ID 1fdb4dcb4225228e5ebc36c3de4d259fe730aedf # Parent f4f814b0dd359371edd9f536459c37d812ac047d Bug 1447480 - Add support of MOZ_FALLTHROUGH_ASSERT without any argument r=hsivonen MozReview-Commit-ID: 6xrdrggcVFR diff --git a/mfbt/Assertions.h b/mfbt/Assertions.h --- a/mfbt/Assertions.h +++ b/mfbt/Assertions.h @@ -611,17 +611,17 @@ struct AssertionConditionType * default: * // This case asserts in debug builds, falls through in release. * MOZ_FALLTHROUGH_ASSERT("Unexpected foo value?!"); * case 5: * return 5; * } */ #ifdef DEBUG -# define MOZ_FALLTHROUGH_ASSERT(reason) MOZ_CRASH("MOZ_FALLTHROUGH_ASSERT: " reason) +# define MOZ_FALLTHROUGH_ASSERT(...) MOZ_CRASH("MOZ_FALLTHROUGH_ASSERT: " __VA_ARGS__) #else # define MOZ_FALLTHROUGH_ASSERT(...) MOZ_FALLTHROUGH #endif /* * MOZ_ALWAYS_TRUE(expr) and MOZ_ALWAYS_FALSE(expr) always evaluate the provided * expression, in debug builds and in release builds both. Then, in debug * builds only, the value of the expression is asserted either true or false