Bug 1447480 - Add support of MOZ_FALLTHROUGH_ASSERT without any argument r=hsivonen
☠☠ backed out by e92d8ad7c1a0 ☠ ☠
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 05 Apr 2018 11:42:23 +0200
changeset 411893 5dfbd42ce5154f476d310e0533ee7406b1555bc0
parent 411892 a454ed4489f2b01a4a3da728681d0d69527845e6
child 411894 e92d8ad7c1a0e58e08f72650c8aa561ff1afd1cd
push id101778
push usernerli@mozilla.com
push dateThu, 05 Apr 2018 15:23:15 +0000
treeherdermozilla-inbound@d753e852d0fc [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,16 +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() MOZ_CRASH()
 #  define MOZ_FALLTHROUGH_ASSERT(reason) MOZ_CRASH("MOZ_FALLTHROUGH_ASSERT: " reason)
 #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