Bug 1447480 - Add support of MOZ_FALLTHROUGH_ASSERT without any argument r=hsivonen
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 05 Apr 2018 11:42:23 +0200
changeset 412376 1fdb4dcb4225228e5ebc36c3de4d259fe730aedf
parent 412375 639322e83c65ec7dd3394921cd02804935f021fc
child 412377 8fc7e04ebbf4548870666e5fb31f2e5d67795dfa
push id101913
push usernerli@mozilla.com
push dateMon, 09 Apr 2018 17:05:11 +0000
treeherdermozilla-inbound@b2a40b12e2ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsivonen
bugs1447480
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1447480 - Add support of MOZ_FALLTHROUGH_ASSERT without any argument r=hsivonen MozReview-Commit-ID: 6xrdrggcVFR
mfbt/Assertions.h
--- a/mfbt/Assertions.h
+++ b/mfbt/Assertions.h
@@ -591,17 +591,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