Bug 1533777 - use a release assert in CheckedInt::value; r=froydnj
authorAlex Gaynor <agaynor@mozilla.com>
Wed, 27 Mar 2019 13:30:23 +0000
changeset 466347 16f19322ec762261a5abe9e70c935e6e6bf90582
parent 466346 07595d5c98d2137f0a7dd4334b0c315988b8642e
child 466348 e94edf4ec19f11dce836449882d37d039773c68c
child 466370 597f8780f0739773985dead402389283cda61fb8
push id112577
push useraciure@mozilla.com
push dateWed, 27 Mar 2019 16:44:02 +0000
treeherdermozilla-inbound@6e4c046bbac7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1533777
milestone68.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