Bug 1533777 - use a release assert in CheckedInt::value; r=froydnj
authorAlex Gaynor <agaynor@mozilla.com>
Mon, 11 Mar 2019 13:55:28 +0000
changeset 521372 2f2a20c16289b0dbd0faff84deca0e23782d6acd
parent 521371 423f48c9823088ca50cb00d88dd78c4046b1f054
child 521373 af2e51990c3d4b650c95b56e705eb6c9e051282b
push id10866
push usernerli@mozilla.com
push dateTue, 12 Mar 2019 18:59:09 +0000
treeherdermozilla-beta@445c24a51727 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1533777
milestone67.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 1533777 - use a release assert in CheckedInt::value; r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D22970
mfbt/CheckedInt.h
--- a/mfbt/CheckedInt.h
+++ b/mfbt/CheckedInt.h
@@ -527,17 +527,17 @@ class CheckedInt {
   /** Constructs a valid checked integer with initial value 0 */
   constexpr CheckedInt() : mValue(0), mIsValid(true) {
     static_assert(detail::IsSupported<T>::value,
                   "This type is not supported by CheckedInt");
   }
 
   /** @returns the actual value */
   T value() const {
-    MOZ_ASSERT(
+    MOZ_RELEASE_ASSERT(
         mIsValid,
         "Invalid checked integer (division by zero or integer overflow)");
     return mValue;
   }
 
   /**
    * @returns true if the checked integer is valid, i.e. is not the result
    * of an invalid operation or of an operation involving an invalid checked