Bug 807607 - Make MFBT tests use MOZ_RELEASE_ASSERT instead of MOZ_ASSERT to ensure test coverage in non-DEBUG - r=Waldo
authorBenoit Jacob <bjacob@mozilla.com>
Thu, 24 Apr 2014 17:06:50 -0400
changeset 180449 4cf3ec066bc7d2e59b49438d6225fc418d83ce77
parent 180448 8f5f134ee1164678afd39684e522574b34ae9696
child 180450 64ae2bfb5b267868dc6ba17233f804fb6989a9cd
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersWaldo
bugs807607
milestone31.0a1
Bug 807607 - Make MFBT tests use MOZ_RELEASE_ASSERT instead of MOZ_ASSERT to ensure test coverage in non-DEBUG - r=Waldo find mfbt/tests/ -type f | xargs sed -i 's/MOZ_ASSERT/MOZ_RELEASE_ASSERT/g'
mfbt/tests/TestAtomics.cpp
mfbt/tests/TestBloomFilter.cpp
mfbt/tests/TestCasting.cpp
mfbt/tests/TestCeilingFloor.cpp
mfbt/tests/TestCountPopulation.cpp
mfbt/tests/TestCountZeroes.cpp
mfbt/tests/TestEndian.cpp
mfbt/tests/TestEnumSet.cpp
mfbt/tests/TestFloatingPoint.cpp
mfbt/tests/TestIntegerPrintfMacros.cpp
mfbt/tests/TestRollingMean.cpp
mfbt/tests/TestSHA1.cpp
mfbt/tests/TestTypeTraits.cpp
mfbt/tests/TestWeakPtr.cpp
--- a/mfbt/tests/TestAtomics.cpp
+++ b/mfbt/tests/TestAtomics.cpp
@@ -1,203 +1,201 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/Assertions.h"
 #include "mozilla/Atomics.h"
-#include "mozilla/DebugOnly.h"
 
 #include <stdint.h>
 
 using mozilla::Atomic;
-using mozilla::DebugOnly;
 using mozilla::MemoryOrdering;
 using mozilla::Relaxed;
 using mozilla::ReleaseAcquire;
 using mozilla::SequentiallyConsistent;
 
 template <typename T, MemoryOrdering Order>
 static void
 TestTypeWithOrdering()
 {
   Atomic<T, Order> atomic(5);
-  MOZ_ASSERT(atomic == 5, "Atomic variable did not initialize");
+  MOZ_RELEASE_ASSERT(atomic == 5, "Atomic variable did not initialize");
 
   // Test atomic increment
-  MOZ_ASSERT(++atomic == T(6), "Atomic increment did not work");
-  MOZ_ASSERT(atomic++ == T(6), "Atomic post-increment did not work");
-  MOZ_ASSERT(atomic == T(7), "Atomic post-increment did not work");
+  MOZ_RELEASE_ASSERT(++atomic == T(6), "Atomic increment did not work");
+  MOZ_RELEASE_ASSERT(atomic++ == T(6), "Atomic post-increment did not work");
+  MOZ_RELEASE_ASSERT(atomic == T(7), "Atomic post-increment did not work");
 
   // Test atomic decrement
-  MOZ_ASSERT(--atomic == 6, "Atomic decrement did not work");
-  MOZ_ASSERT(atomic-- == 6, "Atomic post-decrement did not work");
-  MOZ_ASSERT(atomic == 5, "Atomic post-decrement did not work");
+  MOZ_RELEASE_ASSERT(--atomic == 6, "Atomic decrement did not work");
+  MOZ_RELEASE_ASSERT(atomic-- == 6, "Atomic post-decrement did not work");
+  MOZ_RELEASE_ASSERT(atomic == 5, "Atomic post-decrement did not work");
 
   // Test other arithmetic.
-  DebugOnly<T> result;
+  T result;
   result = (atomic += T(5));
-  MOZ_ASSERT(atomic == T(10), "Atomic += did not work");
-  MOZ_ASSERT(result == T(10), "Atomic += returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == T(10), "Atomic += did not work");
+  MOZ_RELEASE_ASSERT(result == T(10), "Atomic += returned the wrong value");
   result = (atomic -= T(3));
-  MOZ_ASSERT(atomic == T(7), "Atomic -= did not work");
-  MOZ_ASSERT(result == T(7), "Atomic -= returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == T(7), "Atomic -= did not work");
+  MOZ_RELEASE_ASSERT(result == T(7), "Atomic -= returned the wrong value");
 
   // Test assignment
   result = (atomic = T(5));
-  MOZ_ASSERT(atomic == T(5), "Atomic assignment failed");
-  MOZ_ASSERT(result == T(5), "Atomic assignment returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == T(5), "Atomic assignment failed");
+  MOZ_RELEASE_ASSERT(result == T(5), "Atomic assignment returned the wrong value");
 
   // Test logical operations.
   result = (atomic ^= T(2));
-  MOZ_ASSERT(atomic == T(7), "Atomic ^= did not work");
-  MOZ_ASSERT(result == T(7), "Atomic ^= returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == T(7), "Atomic ^= did not work");
+  MOZ_RELEASE_ASSERT(result == T(7), "Atomic ^= returned the wrong value");
   result = (atomic ^= T(4));
-  MOZ_ASSERT(atomic == T(3), "Atomic ^= did not work");
-  MOZ_ASSERT(result == T(3), "Atomic ^= returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == T(3), "Atomic ^= did not work");
+  MOZ_RELEASE_ASSERT(result == T(3), "Atomic ^= returned the wrong value");
   result = (atomic |= T(8));
-  MOZ_ASSERT(atomic == T(11), "Atomic |= did not work");
-  MOZ_ASSERT(result == T(11), "Atomic |= returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == T(11), "Atomic |= did not work");
+  MOZ_RELEASE_ASSERT(result == T(11), "Atomic |= returned the wrong value");
   result = (atomic |= T(8));
-  MOZ_ASSERT(atomic == T(11), "Atomic |= did not work");
-  MOZ_ASSERT(result == T(11), "Atomic |= returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == T(11), "Atomic |= did not work");
+  MOZ_RELEASE_ASSERT(result == T(11), "Atomic |= returned the wrong value");
   result = (atomic &= T(12));
-  MOZ_ASSERT(atomic == T(8), "Atomic &= did not work");
-  MOZ_ASSERT(result == T(8), "Atomic &= returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == T(8), "Atomic &= did not work");
+  MOZ_RELEASE_ASSERT(result == T(8), "Atomic &= returned the wrong value");
 
   // Test exchange.
   atomic = T(30);
   result = atomic.exchange(42);
-  MOZ_ASSERT(atomic == T(42), "Atomic exchange did not work");
-  MOZ_ASSERT(result == T(30), "Atomic exchange returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == T(42), "Atomic exchange did not work");
+  MOZ_RELEASE_ASSERT(result == T(30), "Atomic exchange returned the wrong value");
 
   // Test CAS.
   atomic = T(1);
-  DebugOnly<bool> boolResult = atomic.compareExchange(0, 2);
-  MOZ_ASSERT(!boolResult, "CAS should have returned false.");
-  MOZ_ASSERT(atomic == T(1), "CAS shouldn't have done anything.");
+  bool boolResult = atomic.compareExchange(0, 2);
+  MOZ_RELEASE_ASSERT(!boolResult, "CAS should have returned false.");
+  MOZ_RELEASE_ASSERT(atomic == T(1), "CAS shouldn't have done anything.");
 
   boolResult = atomic.compareExchange(1, 42);
-  MOZ_ASSERT(boolResult, "CAS should have succeeded.");
-  MOZ_ASSERT(atomic == T(42), "CAS should have changed atomic's value.");
+  MOZ_RELEASE_ASSERT(boolResult, "CAS should have succeeded.");
+  MOZ_RELEASE_ASSERT(atomic == T(42), "CAS should have changed atomic's value.");
 }
 
 template<typename T, MemoryOrdering Order>
 static void
 TestPointerWithOrdering()
 {
   T array1[10];
   Atomic<T*, Order> atomic(array1);
-  MOZ_ASSERT(atomic == array1, "Atomic variable did not initialize");
+  MOZ_RELEASE_ASSERT(atomic == array1, "Atomic variable did not initialize");
 
   // Test atomic increment
-  MOZ_ASSERT(++atomic == array1 + 1, "Atomic increment did not work");
-  MOZ_ASSERT(atomic++ == array1 + 1, "Atomic post-increment did not work");
-  MOZ_ASSERT(atomic == array1 + 2, "Atomic post-increment did not work");
+  MOZ_RELEASE_ASSERT(++atomic == array1 + 1, "Atomic increment did not work");
+  MOZ_RELEASE_ASSERT(atomic++ == array1 + 1, "Atomic post-increment did not work");
+  MOZ_RELEASE_ASSERT(atomic == array1 + 2, "Atomic post-increment did not work");
 
   // Test atomic decrement
-  MOZ_ASSERT(--atomic == array1 + 1, "Atomic decrement did not work");
-  MOZ_ASSERT(atomic-- == array1 + 1, "Atomic post-decrement did not work");
-  MOZ_ASSERT(atomic == array1, "Atomic post-decrement did not work");
+  MOZ_RELEASE_ASSERT(--atomic == array1 + 1, "Atomic decrement did not work");
+  MOZ_RELEASE_ASSERT(atomic-- == array1 + 1, "Atomic post-decrement did not work");
+  MOZ_RELEASE_ASSERT(atomic == array1, "Atomic post-decrement did not work");
 
   // Test other arithmetic operations
-  DebugOnly<T*> result;
+  T* result;
   result = (atomic += 2);
-  MOZ_ASSERT(atomic == array1 + 2, "Atomic += did not work");
-  MOZ_ASSERT(result == array1 + 2, "Atomic += returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == array1 + 2, "Atomic += did not work");
+  MOZ_RELEASE_ASSERT(result == array1 + 2, "Atomic += returned the wrong value");
   result = (atomic -= 1);
-  MOZ_ASSERT(atomic == array1 + 1, "Atomic -= did not work");
-  MOZ_ASSERT(result == array1 + 1, "Atomic -= returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == array1 + 1, "Atomic -= did not work");
+  MOZ_RELEASE_ASSERT(result == array1 + 1, "Atomic -= returned the wrong value");
 
   // Test stores
   result = (atomic = array1);
-  MOZ_ASSERT(atomic == array1, "Atomic assignment did not work");
-  MOZ_ASSERT(result == array1, "Atomic assignment returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == array1, "Atomic assignment did not work");
+  MOZ_RELEASE_ASSERT(result == array1, "Atomic assignment returned the wrong value");
 
   // Test exchange
   atomic = array1 + 2;
   result = atomic.exchange(array1);
-  MOZ_ASSERT(atomic == array1, "Atomic exchange did not work");
-  MOZ_ASSERT(result == array1 + 2, "Atomic exchange returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == array1, "Atomic exchange did not work");
+  MOZ_RELEASE_ASSERT(result == array1 + 2, "Atomic exchange returned the wrong value");
 
   atomic = array1;
-  DebugOnly<bool> boolResult = atomic.compareExchange(array1 + 1, array1 + 2);
-  MOZ_ASSERT(!boolResult, "CAS should have returned false.");
-  MOZ_ASSERT(atomic == array1, "CAS shouldn't have done anything.");
+  bool boolResult = atomic.compareExchange(array1 + 1, array1 + 2);
+  MOZ_RELEASE_ASSERT(!boolResult, "CAS should have returned false.");
+  MOZ_RELEASE_ASSERT(atomic == array1, "CAS shouldn't have done anything.");
 
   boolResult = atomic.compareExchange(array1, array1 + 3);
-  MOZ_ASSERT(boolResult, "CAS should have succeeded.");
-  MOZ_ASSERT(atomic == array1 + 3, "CAS should have changed atomic's value.");
+  MOZ_RELEASE_ASSERT(boolResult, "CAS should have succeeded.");
+  MOZ_RELEASE_ASSERT(atomic == array1 + 3, "CAS should have changed atomic's value.");
 }
 
 enum EnumType {
   EnumType_0 = 0,
   EnumType_1 = 1,
   EnumType_2 = 2,
   EnumType_3 = 3
 };
 
 template<MemoryOrdering Order>
 static void
 TestEnumWithOrdering()
 {
   Atomic<EnumType, Order> atomic(EnumType_2);
-  MOZ_ASSERT(atomic == EnumType_2, "Atomic variable did not initialize");
+  MOZ_RELEASE_ASSERT(atomic == EnumType_2, "Atomic variable did not initialize");
 
   // Test assignment
-  DebugOnly<EnumType> result;
+  EnumType result;
   result = (atomic = EnumType_3);
-  MOZ_ASSERT(atomic == EnumType_3, "Atomic assignment failed");
-  MOZ_ASSERT(result == EnumType_3, "Atomic assignment returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == EnumType_3, "Atomic assignment failed");
+  MOZ_RELEASE_ASSERT(result == EnumType_3, "Atomic assignment returned the wrong value");
 
   // Test exchange.
   atomic = EnumType_1;
   result = atomic.exchange(EnumType_2);
-  MOZ_ASSERT(atomic == EnumType_2, "Atomic exchange did not work");
-  MOZ_ASSERT(result == EnumType_1, "Atomic exchange returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == EnumType_2, "Atomic exchange did not work");
+  MOZ_RELEASE_ASSERT(result == EnumType_1, "Atomic exchange returned the wrong value");
 
   // Test CAS.
   atomic = EnumType_1;
-  DebugOnly<bool> boolResult = atomic.compareExchange(EnumType_0, EnumType_2);
-  MOZ_ASSERT(!boolResult, "CAS should have returned false.");
-  MOZ_ASSERT(atomic == EnumType_1, "CAS shouldn't have done anything.");
+  bool boolResult = atomic.compareExchange(EnumType_0, EnumType_2);
+  MOZ_RELEASE_ASSERT(!boolResult, "CAS should have returned false.");
+  MOZ_RELEASE_ASSERT(atomic == EnumType_1, "CAS shouldn't have done anything.");
 
   boolResult = atomic.compareExchange(EnumType_1, EnumType_3);
-  MOZ_ASSERT(boolResult, "CAS should have succeeded.");
-  MOZ_ASSERT(atomic == EnumType_3, "CAS should have changed atomic's value.");
+  MOZ_RELEASE_ASSERT(boolResult, "CAS should have succeeded.");
+  MOZ_RELEASE_ASSERT(atomic == EnumType_3, "CAS should have changed atomic's value.");
 }
 
 template <MemoryOrdering Order>
 static void
 TestBoolWithOrdering()
 {
   Atomic<bool, Order> atomic(false);
-  MOZ_ASSERT(atomic == false, "Atomic variable did not initialize");
+  MOZ_RELEASE_ASSERT(atomic == false, "Atomic variable did not initialize");
 
   // Test assignment
-  DebugOnly<bool> result;
+  bool result;
   result = (atomic = true);
-  MOZ_ASSERT(atomic == true, "Atomic assignment failed");
-  MOZ_ASSERT(result == true, "Atomic assignment returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == true, "Atomic assignment failed");
+  MOZ_RELEASE_ASSERT(result == true, "Atomic assignment returned the wrong value");
 
   // Test exchange.
   atomic = false;
   result = atomic.exchange(true);
-  MOZ_ASSERT(atomic == true, "Atomic exchange did not work");
-  MOZ_ASSERT(result == false, "Atomic exchange returned the wrong value");
+  MOZ_RELEASE_ASSERT(atomic == true, "Atomic exchange did not work");
+  MOZ_RELEASE_ASSERT(result == false, "Atomic exchange returned the wrong value");
 
   // Test CAS.
   atomic = false;
-  DebugOnly<bool> boolResult = atomic.compareExchange(true, false);
-  MOZ_ASSERT(!boolResult, "CAS should have returned false.");
-  MOZ_ASSERT(atomic == false, "CAS shouldn't have done anything.");
+  bool boolResult = atomic.compareExchange(true, false);
+  MOZ_RELEASE_ASSERT(!boolResult, "CAS should have returned false.");
+  MOZ_RELEASE_ASSERT(atomic == false, "CAS shouldn't have done anything.");
 
   boolResult = atomic.compareExchange(false, true);
-  MOZ_ASSERT(boolResult, "CAS should have succeeded.");
-  MOZ_ASSERT(atomic == true, "CAS should have changed atomic's value.");
+  MOZ_RELEASE_ASSERT(boolResult, "CAS should have succeeded.");
+  MOZ_RELEASE_ASSERT(atomic == true, "CAS should have changed atomic's value.");
 }
 
 template <typename T>
 static void
 TestType()
 {
   TestTypeWithOrdering<T, SequentiallyConsistent>();
   TestTypeWithOrdering<T, ReleaseAcquire>();
--- a/mfbt/tests/TestBloomFilter.cpp
+++ b/mfbt/tests/TestBloomFilter.cpp
@@ -21,82 +21,82 @@ class FilterChecker
   private:
     uint32_t mHash;
 };
 
 int
 main()
 {
   BloomFilter<12, FilterChecker> *filter = new BloomFilter<12, FilterChecker>();
-  MOZ_ASSERT(filter);
+  MOZ_RELEASE_ASSERT(filter);
 
   FilterChecker one(1);
   FilterChecker two(0x20000);
   FilterChecker many(0x10000);
   FilterChecker multiple(0x20001);
 
   filter->add(&one);
-  MOZ_ASSERT(filter->mightContain(&one),
+  MOZ_RELEASE_ASSERT(filter->mightContain(&one),
              "Filter should contain 'one'");
 
-  MOZ_ASSERT(!filter->mightContain(&multiple),
+  MOZ_RELEASE_ASSERT(!filter->mightContain(&multiple),
              "Filter claims to contain 'multiple' when it should not");
 
-  MOZ_ASSERT(filter->mightContain(&many),
+  MOZ_RELEASE_ASSERT(filter->mightContain(&many),
              "Filter should contain 'many' (false positive)");
 
   filter->add(&two);
-  MOZ_ASSERT(filter->mightContain(&multiple),
+  MOZ_RELEASE_ASSERT(filter->mightContain(&multiple),
              "Filter should contain 'multiple' (false positive)");
 
   // Test basic removals
   filter->remove(&two);
-  MOZ_ASSERT(!filter->mightContain(&multiple),
+  MOZ_RELEASE_ASSERT(!filter->mightContain(&multiple),
              "Filter claims to contain 'multiple' when it should not after two "
              "was removed");
 
   // Test multiple addition/removal
   const size_t FILTER_SIZE = 255;
   for (size_t i = 0; i < FILTER_SIZE - 1; ++i)
     filter->add(&two);
 
-  MOZ_ASSERT(filter->mightContain(&multiple),
+  MOZ_RELEASE_ASSERT(filter->mightContain(&multiple),
              "Filter should contain 'multiple' after 'two' added lots of times "
              "(false positive)");
 
   for (size_t i = 0; i < FILTER_SIZE - 1; ++i)
     filter->remove(&two);
 
-  MOZ_ASSERT(!filter->mightContain(&multiple),
+  MOZ_RELEASE_ASSERT(!filter->mightContain(&multiple),
              "Filter claims to contain 'multiple' when it should not after two "
              "was removed lots of times");
 
   // Test overflowing the filter buckets
   for (size_t i = 0; i < FILTER_SIZE + 1; ++i)
     filter->add(&two);
 
-  MOZ_ASSERT(filter->mightContain(&multiple),
+  MOZ_RELEASE_ASSERT(filter->mightContain(&multiple),
              "Filter should contain 'multiple' after 'two' added lots more "
              "times (false positive)");
 
   for (size_t i = 0; i < FILTER_SIZE + 1; ++i)
     filter->remove(&two);
 
-  MOZ_ASSERT(filter->mightContain(&multiple),
+  MOZ_RELEASE_ASSERT(filter->mightContain(&multiple),
              "Filter claims to not contain 'multiple' even though we should "
              "have run out of space in the buckets (false positive)");
-  MOZ_ASSERT(filter->mightContain(&two),
+  MOZ_RELEASE_ASSERT(filter->mightContain(&two),
              "Filter claims to not contain 'two' even though we should have "
              "run out of space in the buckets (false positive)");
 
   filter->remove(&one);
 
-  MOZ_ASSERT(!filter->mightContain(&one),
+  MOZ_RELEASE_ASSERT(!filter->mightContain(&one),
              "Filter should not contain 'one', because we didn't overflow its "
              "bucket");
 
   filter->clear();
 
-  MOZ_ASSERT(!filter->mightContain(&multiple),
+  MOZ_RELEASE_ASSERT(!filter->mightContain(&multiple),
              "clear() failed to work");
 
   return 0;
 }
--- a/mfbt/tests/TestCasting.cpp
+++ b/mfbt/tests/TestCasting.cpp
@@ -12,94 +12,94 @@ using mozilla::detail::IsInBounds;
 
 template<typename Uint, typename Ulong, bool = (sizeof(Uint) == sizeof(Ulong))>
 struct UintUlongBitwiseCast;
 
 template<typename Uint, typename Ulong>
 struct UintUlongBitwiseCast<Uint, Ulong, true>
 {
     static void test() {
-      MOZ_ASSERT(BitwiseCast<Ulong>(Uint(8675309)) == Ulong(8675309));
+      MOZ_RELEASE_ASSERT(BitwiseCast<Ulong>(Uint(8675309)) == Ulong(8675309));
     }
 };
 
 template<typename Uint, typename Ulong>
 struct UintUlongBitwiseCast<Uint, Ulong, false>
 {
     static void test() { }
 };
 
 static void
 TestBitwiseCast()
 {
-  MOZ_ASSERT(BitwiseCast<int>(int(8675309)) == int(8675309));
+  MOZ_RELEASE_ASSERT(BitwiseCast<int>(int(8675309)) == int(8675309));
   UintUlongBitwiseCast<unsigned int, unsigned long>::test();
 }
 
 static void
 TestSameSize()
 {
-  MOZ_ASSERT((IsInBounds<int16_t, int16_t>(int16_t(0))));
-  MOZ_ASSERT((IsInBounds<int16_t, int16_t>(int16_t(INT16_MIN))));
-  MOZ_ASSERT((IsInBounds<int16_t, int16_t>(int16_t(INT16_MAX))));
-  MOZ_ASSERT((IsInBounds<uint16_t, uint16_t>(uint16_t(UINT16_MAX))));
-  MOZ_ASSERT((IsInBounds<uint16_t, int16_t>(uint16_t(0))));
-  MOZ_ASSERT((!IsInBounds<uint16_t, int16_t>(uint16_t(-1))));
-  MOZ_ASSERT((!IsInBounds<int16_t, uint16_t>(int16_t(-1))));
-  MOZ_ASSERT((IsInBounds<int16_t, uint16_t>(int16_t(INT16_MAX))));
-  MOZ_ASSERT((!IsInBounds<int16_t, uint16_t>(int16_t(INT16_MIN))));
-  MOZ_ASSERT((IsInBounds<int32_t, uint32_t>(int32_t(INT32_MAX))));
-  MOZ_ASSERT((!IsInBounds<int32_t, uint32_t>(int32_t(INT32_MIN))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int16_t, int16_t>(int16_t(0))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int16_t, int16_t>(int16_t(INT16_MIN))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int16_t, int16_t>(int16_t(INT16_MAX))));
+  MOZ_RELEASE_ASSERT((IsInBounds<uint16_t, uint16_t>(uint16_t(UINT16_MAX))));
+  MOZ_RELEASE_ASSERT((IsInBounds<uint16_t, int16_t>(uint16_t(0))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<uint16_t, int16_t>(uint16_t(-1))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int16_t, uint16_t>(int16_t(-1))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int16_t, uint16_t>(int16_t(INT16_MAX))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int16_t, uint16_t>(int16_t(INT16_MIN))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int32_t, uint32_t>(int32_t(INT32_MAX))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int32_t, uint32_t>(int32_t(INT32_MIN))));
 }
 
 static void
 TestToBiggerSize()
 {
-  MOZ_ASSERT((IsInBounds<int16_t, int32_t>(int16_t(0))));
-  MOZ_ASSERT((IsInBounds<int16_t, int32_t>(int16_t(INT16_MIN))));
-  MOZ_ASSERT((IsInBounds<int16_t, int32_t>(int16_t(INT16_MAX))));
-  MOZ_ASSERT((IsInBounds<uint16_t, uint32_t>(uint16_t(UINT16_MAX))));
-  MOZ_ASSERT((IsInBounds<uint16_t, int32_t>(uint16_t(0))));
-  MOZ_ASSERT((IsInBounds<uint16_t, int32_t>(uint16_t(-1))));
-  MOZ_ASSERT((!IsInBounds<int16_t, uint32_t>(int16_t(-1))));
-  MOZ_ASSERT((IsInBounds<int16_t, uint32_t>(int16_t(INT16_MAX))));
-  MOZ_ASSERT((!IsInBounds<int16_t, uint32_t>(int16_t(INT16_MIN))));
-  MOZ_ASSERT((IsInBounds<int32_t, uint64_t>(int32_t(INT32_MAX))));
-  MOZ_ASSERT((!IsInBounds<int32_t, uint64_t>(int32_t(INT32_MIN))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int16_t, int32_t>(int16_t(0))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int16_t, int32_t>(int16_t(INT16_MIN))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int16_t, int32_t>(int16_t(INT16_MAX))));
+  MOZ_RELEASE_ASSERT((IsInBounds<uint16_t, uint32_t>(uint16_t(UINT16_MAX))));
+  MOZ_RELEASE_ASSERT((IsInBounds<uint16_t, int32_t>(uint16_t(0))));
+  MOZ_RELEASE_ASSERT((IsInBounds<uint16_t, int32_t>(uint16_t(-1))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int16_t, uint32_t>(int16_t(-1))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int16_t, uint32_t>(int16_t(INT16_MAX))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int16_t, uint32_t>(int16_t(INT16_MIN))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int32_t, uint64_t>(int32_t(INT32_MAX))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int32_t, uint64_t>(int32_t(INT32_MIN))));
 }
 
 static void
 TestToSmallerSize()
 {
-  MOZ_ASSERT((IsInBounds<int16_t, int8_t>(int16_t(0))));
-  MOZ_ASSERT((!IsInBounds<int16_t, int8_t>(int16_t(INT16_MIN))));
-  MOZ_ASSERT((!IsInBounds<int16_t, int8_t>(int16_t(INT16_MAX))));
-  MOZ_ASSERT((!IsInBounds<uint16_t, uint8_t>(uint16_t(UINT16_MAX))));
-  MOZ_ASSERT((IsInBounds<uint16_t, int8_t>(uint16_t(0))));
-  MOZ_ASSERT((!IsInBounds<uint16_t, int8_t>(uint16_t(-1))));
-  MOZ_ASSERT((!IsInBounds<int16_t, uint8_t>(int16_t(-1))));
-  MOZ_ASSERT((!IsInBounds<int16_t, uint8_t>(int16_t(INT16_MAX))));
-  MOZ_ASSERT((!IsInBounds<int16_t, uint8_t>(int16_t(INT16_MIN))));
-  MOZ_ASSERT((!IsInBounds<int32_t, uint16_t>(int32_t(INT32_MAX))));
-  MOZ_ASSERT((!IsInBounds<int32_t, uint16_t>(int32_t(INT32_MIN))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int16_t, int8_t>(int16_t(0))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int16_t, int8_t>(int16_t(INT16_MIN))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int16_t, int8_t>(int16_t(INT16_MAX))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<uint16_t, uint8_t>(uint16_t(UINT16_MAX))));
+  MOZ_RELEASE_ASSERT((IsInBounds<uint16_t, int8_t>(uint16_t(0))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<uint16_t, int8_t>(uint16_t(-1))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int16_t, uint8_t>(int16_t(-1))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int16_t, uint8_t>(int16_t(INT16_MAX))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int16_t, uint8_t>(int16_t(INT16_MIN))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int32_t, uint16_t>(int32_t(INT32_MAX))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int32_t, uint16_t>(int32_t(INT32_MIN))));
 
   // Boundary cases
-  MOZ_ASSERT((!IsInBounds<int64_t, int32_t>(int64_t(INT32_MIN) - 1)));
-  MOZ_ASSERT((IsInBounds<int64_t, int32_t>(int64_t(INT32_MIN))));
-  MOZ_ASSERT((IsInBounds<int64_t, int32_t>(int64_t(INT32_MIN) + 1)));
-  MOZ_ASSERT((IsInBounds<int64_t, int32_t>(int64_t(INT32_MAX) - 1)));
-  MOZ_ASSERT((IsInBounds<int64_t, int32_t>(int64_t(INT32_MAX))));
-  MOZ_ASSERT((!IsInBounds<int64_t, int32_t>(int64_t(INT32_MAX) + 1)));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int64_t, int32_t>(int64_t(INT32_MIN) - 1)));
+  MOZ_RELEASE_ASSERT((IsInBounds<int64_t, int32_t>(int64_t(INT32_MIN))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int64_t, int32_t>(int64_t(INT32_MIN) + 1)));
+  MOZ_RELEASE_ASSERT((IsInBounds<int64_t, int32_t>(int64_t(INT32_MAX) - 1)));
+  MOZ_RELEASE_ASSERT((IsInBounds<int64_t, int32_t>(int64_t(INT32_MAX))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int64_t, int32_t>(int64_t(INT32_MAX) + 1)));
 
-  MOZ_ASSERT((!IsInBounds<int64_t, uint32_t>(int64_t(-1))));
-  MOZ_ASSERT((IsInBounds<int64_t, uint32_t>(int64_t(0))));
-  MOZ_ASSERT((IsInBounds<int64_t, uint32_t>(int64_t(1))));
-  MOZ_ASSERT((IsInBounds<int64_t, uint32_t>(int64_t(UINT32_MAX) - 1)));
-  MOZ_ASSERT((IsInBounds<int64_t, uint32_t>(int64_t(UINT32_MAX))));
-  MOZ_ASSERT((!IsInBounds<int64_t, uint32_t>(int64_t(UINT32_MAX) + 1)));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int64_t, uint32_t>(int64_t(-1))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int64_t, uint32_t>(int64_t(0))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int64_t, uint32_t>(int64_t(1))));
+  MOZ_RELEASE_ASSERT((IsInBounds<int64_t, uint32_t>(int64_t(UINT32_MAX) - 1)));
+  MOZ_RELEASE_ASSERT((IsInBounds<int64_t, uint32_t>(int64_t(UINT32_MAX))));
+  MOZ_RELEASE_ASSERT((!IsInBounds<int64_t, uint32_t>(int64_t(UINT32_MAX) + 1)));
 }
 
 int
 main()
 {
   TestBitwiseCast();
 
   TestSameSize();
--- a/mfbt/tests/TestCeilingFloor.cpp
+++ b/mfbt/tests/TestCeilingFloor.cpp
@@ -1,84 +1,82 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "mozilla/DebugOnly.h"
 #include "mozilla/MathAlgorithms.h"
 
 using mozilla::CeilingLog2;
-using mozilla::DebugOnly;
 using mozilla::FloorLog2;
 using mozilla::RoundUpPow2;
 
 static void
 TestCeiling()
 {
   for (uint32_t i = 0; i <= 1; i++)
-    MOZ_ASSERT(CeilingLog2(i) == 0);
+    MOZ_RELEASE_ASSERT(CeilingLog2(i) == 0);
 
   for (uint32_t i = 2; i <= 2; i++)
-    MOZ_ASSERT(CeilingLog2(i) == 1);
+    MOZ_RELEASE_ASSERT(CeilingLog2(i) == 1);
 
   for (uint32_t i = 3; i <= 4; i++)
-    MOZ_ASSERT(CeilingLog2(i) == 2);
+    MOZ_RELEASE_ASSERT(CeilingLog2(i) == 2);
 
   for (uint32_t i = 5; i <= 8; i++)
-    MOZ_ASSERT(CeilingLog2(i) == 3);
+    MOZ_RELEASE_ASSERT(CeilingLog2(i) == 3);
 
   for (uint32_t i = 9; i <= 16; i++)
-    MOZ_ASSERT(CeilingLog2(i) == 4);
+    MOZ_RELEASE_ASSERT(CeilingLog2(i) == 4);
 }
 
 static void
 TestFloor()
 {
   for (uint32_t i = 0; i <= 1; i++)
-    MOZ_ASSERT(FloorLog2(i) == 0);
+    MOZ_RELEASE_ASSERT(FloorLog2(i) == 0);
 
   for (uint32_t i = 2; i <= 3; i++)
-    MOZ_ASSERT(FloorLog2(i) == 1);
+    MOZ_RELEASE_ASSERT(FloorLog2(i) == 1);
 
   for (uint32_t i = 4; i <= 7; i++)
-    MOZ_ASSERT(FloorLog2(i) == 2);
+    MOZ_RELEASE_ASSERT(FloorLog2(i) == 2);
 
   for (uint32_t i = 8; i <= 15; i++)
-    MOZ_ASSERT(FloorLog2(i) == 3);
+    MOZ_RELEASE_ASSERT(FloorLog2(i) == 3);
 
   for (uint32_t i = 16; i <= 31; i++)
-    MOZ_ASSERT(FloorLog2(i) == 4);
+    MOZ_RELEASE_ASSERT(FloorLog2(i) == 4);
 }
 
 static void
 TestRoundUpPow2()
 {
-  MOZ_ASSERT(RoundUpPow2(0) == 1);
-  MOZ_ASSERT(RoundUpPow2(1) == 1);
-  MOZ_ASSERT(RoundUpPow2(2) == 2);
-  MOZ_ASSERT(RoundUpPow2(3) == 4);
-  MOZ_ASSERT(RoundUpPow2(4) == 4);
-  MOZ_ASSERT(RoundUpPow2(5) == 8);
-  MOZ_ASSERT(RoundUpPow2(6) == 8);
-  MOZ_ASSERT(RoundUpPow2(7) == 8);
-  MOZ_ASSERT(RoundUpPow2(8) == 8);
-  MOZ_ASSERT(RoundUpPow2(9) == 16);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(0) == 1);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(1) == 1);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(2) == 2);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(3) == 4);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(4) == 4);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(5) == 8);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(6) == 8);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(7) == 8);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(8) == 8);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(9) == 16);
 
-  MOZ_ASSERT(RoundUpPow2(15) == 16);
-  MOZ_ASSERT(RoundUpPow2(16) == 16);
-  MOZ_ASSERT(RoundUpPow2(17) == 32);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(15) == 16);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(16) == 16);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(17) == 32);
 
-  MOZ_ASSERT(RoundUpPow2(31) == 32);
-  MOZ_ASSERT(RoundUpPow2(32) == 32);
-  MOZ_ASSERT(RoundUpPow2(33) == 64);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(31) == 32);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(32) == 32);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(33) == 64);
 
-  DebugOnly<size_t> MaxPow2 = size_t(1) << (sizeof(size_t) * CHAR_BIT - 1);
-  MOZ_ASSERT(RoundUpPow2(MaxPow2 - 1) == MaxPow2);
-  MOZ_ASSERT(RoundUpPow2(MaxPow2) == MaxPow2);
+  size_t MaxPow2 = size_t(1) << (sizeof(size_t) * CHAR_BIT - 1);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(MaxPow2 - 1) == MaxPow2);
+  MOZ_RELEASE_ASSERT(RoundUpPow2(MaxPow2) == MaxPow2);
   // not valid to round up when past the max power of two
 }
 
 int main()
 {
   TestCeiling();
   TestFloor();
 
--- a/mfbt/tests/TestCountPopulation.cpp
+++ b/mfbt/tests/TestCountPopulation.cpp
@@ -5,28 +5,28 @@
 
 #include "mozilla/MathAlgorithms.h"
 
 using mozilla::CountPopulation32;
 
 static void
 TestCountPopulation32()
 {
-  MOZ_ASSERT(CountPopulation32(0xFFFFFFFF) == 32);
-  MOZ_ASSERT(CountPopulation32(0xF0FF1000) == 13);
-  MOZ_ASSERT(CountPopulation32(0x7F8F0001) == 13);
-  MOZ_ASSERT(CountPopulation32(0x3FFF0100) == 15);
-  MOZ_ASSERT(CountPopulation32(0x1FF50010) == 12);
-  MOZ_ASSERT(CountPopulation32(0x00800000) == 1);
-  MOZ_ASSERT(CountPopulation32(0x00400000) == 1);
-  MOZ_ASSERT(CountPopulation32(0x00008000) == 1);
-  MOZ_ASSERT(CountPopulation32(0x00004000) == 1);
-  MOZ_ASSERT(CountPopulation32(0x00000080) == 1);
-  MOZ_ASSERT(CountPopulation32(0x00000040) == 1);
-  MOZ_ASSERT(CountPopulation32(0x00000001) == 1);
-  MOZ_ASSERT(CountPopulation32(0x00000000) == 0);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0xFFFFFFFF) == 32);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0xF0FF1000) == 13);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0x7F8F0001) == 13);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0x3FFF0100) == 15);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0x1FF50010) == 12);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0x00800000) == 1);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0x00400000) == 1);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0x00008000) == 1);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0x00004000) == 1);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0x00000080) == 1);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0x00000040) == 1);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0x00000001) == 1);
+  MOZ_RELEASE_ASSERT(CountPopulation32(0x00000000) == 0);
 }
 
 int main()
 {
   TestCountPopulation32();
   return 0;
 }
--- a/mfbt/tests/TestCountZeroes.cpp
+++ b/mfbt/tests/TestCountZeroes.cpp
@@ -8,91 +8,91 @@
 using mozilla::CountLeadingZeroes32;
 using mozilla::CountLeadingZeroes64;
 using mozilla::CountTrailingZeroes32;
 using mozilla::CountTrailingZeroes64;
 
 static void
 TestLeadingZeroes32()
 {
-  MOZ_ASSERT(CountLeadingZeroes32(0xF0FF1000) == 0);
-  MOZ_ASSERT(CountLeadingZeroes32(0x7F8F0001) == 1);
-  MOZ_ASSERT(CountLeadingZeroes32(0x3FFF0100) == 2);
-  MOZ_ASSERT(CountLeadingZeroes32(0x1FF50010) == 3);
-  MOZ_ASSERT(CountLeadingZeroes32(0x00800000) == 8);
-  MOZ_ASSERT(CountLeadingZeroes32(0x00400000) == 9);
-  MOZ_ASSERT(CountLeadingZeroes32(0x00008000) == 16);
-  MOZ_ASSERT(CountLeadingZeroes32(0x00004000) == 17);
-  MOZ_ASSERT(CountLeadingZeroes32(0x00000080) == 24);
-  MOZ_ASSERT(CountLeadingZeroes32(0x00000040) == 25);
-  MOZ_ASSERT(CountLeadingZeroes32(0x00000001) == 31);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes32(0xF0FF1000) == 0);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes32(0x7F8F0001) == 1);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes32(0x3FFF0100) == 2);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes32(0x1FF50010) == 3);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes32(0x00800000) == 8);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes32(0x00400000) == 9);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes32(0x00008000) == 16);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes32(0x00004000) == 17);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes32(0x00000080) == 24);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes32(0x00000040) == 25);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes32(0x00000001) == 31);
 }
 
 static void
 TestLeadingZeroes64()
 {
-  MOZ_ASSERT(CountLeadingZeroes64(0xF000F0F010000000) == 0);
-  MOZ_ASSERT(CountLeadingZeroes64(0x70F080F000000001) == 1);
-  MOZ_ASSERT(CountLeadingZeroes64(0x30F0F0F000100000) == 2);
-  MOZ_ASSERT(CountLeadingZeroes64(0x10F0F05000000100) == 3);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0080000000000001) == 8);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0040000010001000) == 9);
-  MOZ_ASSERT(CountLeadingZeroes64(0x000080F010000000) == 16);
-  MOZ_ASSERT(CountLeadingZeroes64(0x000040F010000000) == 17);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0000008000100100) == 24);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0000004100010010) == 25);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0000000080100100) == 32);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0000000041001010) == 33);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0000000000800100) == 40);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0000000000411010) == 41);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0000000000008001) == 48);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0000000000004010) == 49);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0000000000000081) == 56);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0000000000000040) == 57);
-  MOZ_ASSERT(CountLeadingZeroes64(0x0000000000000001) == 63);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0xF000F0F010000000) == 0);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x70F080F000000001) == 1);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x30F0F0F000100000) == 2);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x10F0F05000000100) == 3);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0080000000000001) == 8);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0040000010001000) == 9);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x000080F010000000) == 16);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x000040F010000000) == 17);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0000008000100100) == 24);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0000004100010010) == 25);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0000000080100100) == 32);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0000000041001010) == 33);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0000000000800100) == 40);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0000000000411010) == 41);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0000000000008001) == 48);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0000000000004010) == 49);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0000000000000081) == 56);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0000000000000040) == 57);
+  MOZ_RELEASE_ASSERT(CountLeadingZeroes64(0x0000000000000001) == 63);
 }
 
 static void
 TestTrailingZeroes32()
 {
-  MOZ_ASSERT(CountTrailingZeroes32(0x0100FFFF) == 0);
-  MOZ_ASSERT(CountTrailingZeroes32(0x7000FFFE) == 1);
-  MOZ_ASSERT(CountTrailingZeroes32(0x0080FFFC) == 2);
-  MOZ_ASSERT(CountTrailingZeroes32(0x0080FFF8) == 3);
-  MOZ_ASSERT(CountTrailingZeroes32(0x010FFF00) == 8);
-  MOZ_ASSERT(CountTrailingZeroes32(0x7000FE00) == 9);
-  MOZ_ASSERT(CountTrailingZeroes32(0x10CF0000) == 16);
-  MOZ_ASSERT(CountTrailingZeroes32(0x0BDE0000) == 17);
-  MOZ_ASSERT(CountTrailingZeroes32(0x0F000000) == 24);
-  MOZ_ASSERT(CountTrailingZeroes32(0xDE000000) == 25);
-  MOZ_ASSERT(CountTrailingZeroes32(0x80000000) == 31);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes32(0x0100FFFF) == 0);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes32(0x7000FFFE) == 1);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes32(0x0080FFFC) == 2);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes32(0x0080FFF8) == 3);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes32(0x010FFF00) == 8);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes32(0x7000FE00) == 9);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes32(0x10CF0000) == 16);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes32(0x0BDE0000) == 17);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes32(0x0F000000) == 24);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes32(0xDE000000) == 25);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes32(0x80000000) == 31);
 }
 
 static void
 TestTrailingZeroes64()
 {
-  MOZ_ASSERT(CountTrailingZeroes64(0x000100000F0F0F0F) == 0);
-  MOZ_ASSERT(CountTrailingZeroes64(0x070000000F0F0F0E) == 1);
-  MOZ_ASSERT(CountTrailingZeroes64(0x000008000F0F0F0C) == 2);
-  MOZ_ASSERT(CountTrailingZeroes64(0x000008000F0F0F08) == 3);
-  MOZ_ASSERT(CountTrailingZeroes64(0xC001000F0F0F0F00) == 8);
-  MOZ_ASSERT(CountTrailingZeroes64(0x0200000F0F0F0E00) == 9);
-  MOZ_ASSERT(CountTrailingZeroes64(0xB0C10F0FEFDF0000) == 16);
-  MOZ_ASSERT(CountTrailingZeroes64(0x0AAA00F0FF0E0000) == 17);
-  MOZ_ASSERT(CountTrailingZeroes64(0xD010F0FEDF000000) == 24);
-  MOZ_ASSERT(CountTrailingZeroes64(0x7AAF0CF0BE000000) == 25);
-  MOZ_ASSERT(CountTrailingZeroes64(0x20F0A5D100000000) == 32);
-  MOZ_ASSERT(CountTrailingZeroes64(0x489BF0B200000000) == 33);
-  MOZ_ASSERT(CountTrailingZeroes64(0xE0F0D10000000000) == 40);
-  MOZ_ASSERT(CountTrailingZeroes64(0x97F0B20000000000) == 41);
-  MOZ_ASSERT(CountTrailingZeroes64(0x2C07000000000000) == 48);
-  MOZ_ASSERT(CountTrailingZeroes64(0x1FBA000000000000) == 49);
-  MOZ_ASSERT(CountTrailingZeroes64(0x0100000000000000) == 56);
-  MOZ_ASSERT(CountTrailingZeroes64(0x0200000000000000) == 57);
-  MOZ_ASSERT(CountTrailingZeroes64(0x8000000000000000) == 63);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x000100000F0F0F0F) == 0);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x070000000F0F0F0E) == 1);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x000008000F0F0F0C) == 2);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x000008000F0F0F08) == 3);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0xC001000F0F0F0F00) == 8);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x0200000F0F0F0E00) == 9);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0xB0C10F0FEFDF0000) == 16);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x0AAA00F0FF0E0000) == 17);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0xD010F0FEDF000000) == 24);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x7AAF0CF0BE000000) == 25);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x20F0A5D100000000) == 32);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x489BF0B200000000) == 33);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0xE0F0D10000000000) == 40);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x97F0B20000000000) == 41);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x2C07000000000000) == 48);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x1FBA000000000000) == 49);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x0100000000000000) == 56);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x0200000000000000) == 57);
+  MOZ_RELEASE_ASSERT(CountTrailingZeroes64(0x8000000000000000) == 63);
 }
 
 int main()
 {
   TestLeadingZeroes32();
   TestLeadingZeroes64();
   TestTrailingZeroes32();
   TestTrailingZeroes64();
--- a/mfbt/tests/TestEndian.cpp
+++ b/mfbt/tests/TestEndian.cpp
@@ -1,50 +1,48 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/Assertions.h"
-#include "mozilla/DebugOnly.h"
 #include "mozilla/Endian.h"
 
 #include <stddef.h>
 
 using mozilla::BigEndian;
-using mozilla::DebugOnly;
 using mozilla::LittleEndian;
 using mozilla::NativeEndian;
 
 template<typename T>
 void
 TestSingleSwap(T value, T swappedValue)
 {
 #if MOZ_LITTLE_ENDIAN
-  MOZ_ASSERT(NativeEndian::swapToBigEndian(value) == swappedValue);
-  MOZ_ASSERT(NativeEndian::swapFromBigEndian(value) == swappedValue);
-  MOZ_ASSERT(NativeEndian::swapToNetworkOrder(value) == swappedValue);
-  MOZ_ASSERT(NativeEndian::swapFromNetworkOrder(value) == swappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapToBigEndian(value) == swappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapFromBigEndian(value) == swappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapToNetworkOrder(value) == swappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapFromNetworkOrder(value) == swappedValue);
 #else
-  MOZ_ASSERT(NativeEndian::swapToLittleEndian(value) == swappedValue);
-  MOZ_ASSERT(NativeEndian::swapFromLittleEndian(value) == swappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapToLittleEndian(value) == swappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapFromLittleEndian(value) == swappedValue);
 #endif
 }
 
 template<typename T>
 void
 TestSingleNoSwap(T value, T notSwappedValue)
 {
 #if MOZ_LITTLE_ENDIAN
-  MOZ_ASSERT(NativeEndian::swapToLittleEndian(value) == notSwappedValue);
-  MOZ_ASSERT(NativeEndian::swapFromLittleEndian(value) == notSwappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapToLittleEndian(value) == notSwappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapFromLittleEndian(value) == notSwappedValue);
 #else
-  MOZ_ASSERT(NativeEndian::swapToBigEndian(value) == notSwappedValue);
-  MOZ_ASSERT(NativeEndian::swapFromBigEndian(value) == notSwappedValue);
-  MOZ_ASSERT(NativeEndian::swapToNetworkOrder(value) == notSwappedValue);
-  MOZ_ASSERT(NativeEndian::swapFromNetworkOrder(value) == notSwappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapToBigEndian(value) == notSwappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapFromBigEndian(value) == notSwappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapToNetworkOrder(value) == notSwappedValue);
+  MOZ_RELEASE_ASSERT(NativeEndian::swapFromNetworkOrder(value) == notSwappedValue);
 #endif
 }
 
 // Endian.h functions are declared as protected in an base class and
 // then re-exported as public in public derived classes.  The
 // standardese around explicit instantiation of templates is not clear
 // in such cases.  Provide these wrappers to make things more explicit.
 // For your own enlightenment, you may wish to peruse:
@@ -101,36 +99,36 @@ TestBulkSwapToSub(enum SwapExpectation e
                   T (*readerFunc)(const void*))
 {
   const size_t arraySize = 2 * Count;
   const size_t bufferSize = arraySize * sizeof(T);
   static uint8_t buffer[bufferSize];
   const uint8_t fillValue = 0xa5;
   static uint8_t checkBuffer[bufferSize];
 
-  MOZ_ASSERT(bufferSize > 2 * sizeof(T));
+  MOZ_RELEASE_ASSERT(bufferSize > 2 * sizeof(T));
 
   memset(checkBuffer, fillValue, bufferSize);
 
   for (size_t startPosition = 0; startPosition < sizeof(T); ++startPosition) {
     for (size_t nValues = 0; nValues < Count; ++nValues) {
       memset(buffer, fillValue, bufferSize);
       swapperFunc(buffer + startPosition, values, nValues);
 
-      MOZ_ASSERT(memcmp(buffer, checkBuffer, startPosition) == 0);
-      DebugOnly<size_t> valuesEndPosition = startPosition + sizeof(T) * nValues;
-      MOZ_ASSERT(memcmp(buffer + valuesEndPosition,
+      MOZ_RELEASE_ASSERT(memcmp(buffer, checkBuffer, startPosition) == 0);
+      size_t valuesEndPosition = startPosition + sizeof(T) * nValues;
+      MOZ_RELEASE_ASSERT(memcmp(buffer + valuesEndPosition,
                         checkBuffer + valuesEndPosition,
                         bufferSize - valuesEndPosition) == 0);
       if (expectSwap == NoSwap) {
-        MOZ_ASSERT(memcmp(buffer + startPosition, values,
+        MOZ_RELEASE_ASSERT(memcmp(buffer + startPosition, values,
                           nValues * sizeof(T)) == 0);
       }
       for (size_t i = 0; i < nValues; ++i) {
-        MOZ_ASSERT(readerFunc(buffer + startPosition + sizeof(T) * i) ==
+        MOZ_RELEASE_ASSERT(readerFunc(buffer + startPosition + sizeof(T) * i) ==
                    values[i]);
       }
     }
   }
 }
 
 template<typename T, size_t Count>
 void
@@ -147,27 +145,27 @@ TestBulkSwapFromSub(enum SwapExpectation
 
   memset(checkBuffer, fillValue, bufferSize);
 
   for (size_t startPosition = 0; startPosition < Count; ++startPosition) {
     for (size_t nValues = 0; nValues < (Count - startPosition); ++nValues) {
       memset(buffer, fillValue, bufferSize);
       swapperFunc(buffer + startPosition, values, nValues);
 
-      MOZ_ASSERT(memcmp(buffer, checkBuffer, startPosition * sizeof(T)) == 0);
-      DebugOnly<size_t> valuesEndPosition = startPosition + nValues;
-      MOZ_ASSERT(memcmp(buffer + valuesEndPosition,
+      MOZ_RELEASE_ASSERT(memcmp(buffer, checkBuffer, startPosition * sizeof(T)) == 0);
+      size_t valuesEndPosition = startPosition + nValues;
+      MOZ_RELEASE_ASSERT(memcmp(buffer + valuesEndPosition,
                         checkBuffer + valuesEndPosition,
                         (arraySize - valuesEndPosition) * sizeof(T)) == 0);
       if (expectSwap == NoSwap) {
-        MOZ_ASSERT(memcmp(buffer + startPosition, values,
+        MOZ_RELEASE_ASSERT(memcmp(buffer + startPosition, values,
                           nValues * sizeof(T)) == 0);
       }
       for (size_t i = 0; i < nValues; ++i)
-        MOZ_ASSERT(readerFunc(buffer + startPosition + i) == values[i]);
+        MOZ_RELEASE_ASSERT(readerFunc(buffer + startPosition + i) == values[i]);
     }
   }
 }
 
 
 template<typename T, size_t Count>
 void
 TestBulkInPlaceSub(enum SwapExpectation expectSwap,
@@ -176,37 +174,37 @@ TestBulkInPlaceSub(enum SwapExpectation 
                    T (*readerFunc)(const void*))
 {
   const size_t bufferCount = 4 * Count;
   const size_t bufferSize = bufferCount * sizeof(T);
   static T buffer[bufferCount];
   const T fillValue = 0xa5;
   static T checkBuffer[bufferCount];
 
-  MOZ_ASSERT(bufferSize > 2 * sizeof(T));
+  MOZ_RELEASE_ASSERT(bufferSize > 2 * sizeof(T));
 
   memset(checkBuffer, fillValue, bufferSize);
 
   for (size_t startPosition = 0; startPosition < Count; ++startPosition) {
     for (size_t nValues = 0; nValues < Count; ++nValues) {
       memset(buffer, fillValue, bufferSize);
       memcpy(buffer + startPosition, values, nValues * sizeof(T));
       swapperFunc(buffer + startPosition, nValues);
 
-      MOZ_ASSERT(memcmp(buffer, checkBuffer, startPosition * sizeof(T)) == 0);
-      DebugOnly<size_t> valuesEndPosition = startPosition + nValues;
-      MOZ_ASSERT(memcmp(buffer + valuesEndPosition,
+      MOZ_RELEASE_ASSERT(memcmp(buffer, checkBuffer, startPosition * sizeof(T)) == 0);
+      size_t valuesEndPosition = startPosition + nValues;
+      MOZ_RELEASE_ASSERT(memcmp(buffer + valuesEndPosition,
                         checkBuffer + valuesEndPosition,
                         bufferSize - valuesEndPosition * sizeof(T)) == 0);
       if (expectSwap == NoSwap) {
-        MOZ_ASSERT(memcmp(buffer + startPosition, values,
+        MOZ_RELEASE_ASSERT(memcmp(buffer + startPosition, values,
                           nValues * sizeof(T)) == 0);
       }
       for (size_t i = 0; i < nValues; ++i)
-        MOZ_ASSERT(readerFunc(buffer + startPosition + i) == values[i]);
+        MOZ_RELEASE_ASSERT(readerFunc(buffer + startPosition + i) == values[i]);
     }
   }
 }
 
 template<typename T>
 struct Reader
 {
 };
@@ -299,63 +297,63 @@ main()
   static const uint32_t uint32_values[4] = { 0x1020304, 0x5060708, 0x1020304, 0x5060708 };
   static const int32_t int32_values[4] = { int32_t(0xf1f2f3f4), int32_t(0xf5f6f7f8),
                                            int32_t(0xf1f2f3f4), int32_t(0xf5f6f7f8) };
   static const uint64_t uint64_values[2] = { 0x102030405060708, 0x102030405060708 };
   static const int64_t int64_values[2] = { int64_t(0xf1f2f3f4f5f6f7f8),
                                            int64_t(0xf1f2f3f4f5f6f7f8) };
   uint8_t buffer[8];
 
-  MOZ_ASSERT(LittleEndian::readUint16(&unsigned_bytes[0]) == 0x201);
-  MOZ_ASSERT(BigEndian::readUint16(&unsigned_bytes[0]) == 0x102);
+  MOZ_RELEASE_ASSERT(LittleEndian::readUint16(&unsigned_bytes[0]) == 0x201);
+  MOZ_RELEASE_ASSERT(BigEndian::readUint16(&unsigned_bytes[0]) == 0x102);
 
-  MOZ_ASSERT(LittleEndian::readUint32(&unsigned_bytes[0]) == 0x4030201U);
-  MOZ_ASSERT(BigEndian::readUint32(&unsigned_bytes[0]) == 0x1020304U);
+  MOZ_RELEASE_ASSERT(LittleEndian::readUint32(&unsigned_bytes[0]) == 0x4030201U);
+  MOZ_RELEASE_ASSERT(BigEndian::readUint32(&unsigned_bytes[0]) == 0x1020304U);
 
-  MOZ_ASSERT(LittleEndian::readUint64(&unsigned_bytes[0]) == 0x807060504030201ULL);
-  MOZ_ASSERT(BigEndian::readUint64(&unsigned_bytes[0]) == 0x102030405060708ULL);
+  MOZ_RELEASE_ASSERT(LittleEndian::readUint64(&unsigned_bytes[0]) == 0x807060504030201ULL);
+  MOZ_RELEASE_ASSERT(BigEndian::readUint64(&unsigned_bytes[0]) == 0x102030405060708ULL);
 
   LittleEndian::writeUint16(&buffer[0], 0x201);
-  MOZ_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint16_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint16_t)) == 0);
   BigEndian::writeUint16(&buffer[0], 0x102);
-  MOZ_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint16_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint16_t)) == 0);
 
   LittleEndian::writeUint32(&buffer[0], 0x4030201U);
-  MOZ_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint32_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint32_t)) == 0);
   BigEndian::writeUint32(&buffer[0], 0x1020304U);
-  MOZ_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint32_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint32_t)) == 0);
 
   LittleEndian::writeUint64(&buffer[0], 0x807060504030201ULL);
-  MOZ_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint64_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint64_t)) == 0);
   BigEndian::writeUint64(&buffer[0], 0x102030405060708ULL);
-  MOZ_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint64_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&unsigned_bytes[0], &buffer[0], sizeof(uint64_t)) == 0);
 
-  MOZ_ASSERT(LittleEndian::readInt16(&signed_bytes[0]) == int16_t(0xf2f1));
-  MOZ_ASSERT(BigEndian::readInt16(&signed_bytes[0]) == int16_t(0xf1f2));
+  MOZ_RELEASE_ASSERT(LittleEndian::readInt16(&signed_bytes[0]) == int16_t(0xf2f1));
+  MOZ_RELEASE_ASSERT(BigEndian::readInt16(&signed_bytes[0]) == int16_t(0xf1f2));
 
-  MOZ_ASSERT(LittleEndian::readInt32(&signed_bytes[0]) == int32_t(0xf4f3f2f1));
-  MOZ_ASSERT(BigEndian::readInt32(&signed_bytes[0]) == int32_t(0xf1f2f3f4));
+  MOZ_RELEASE_ASSERT(LittleEndian::readInt32(&signed_bytes[0]) == int32_t(0xf4f3f2f1));
+  MOZ_RELEASE_ASSERT(BigEndian::readInt32(&signed_bytes[0]) == int32_t(0xf1f2f3f4));
 
-  MOZ_ASSERT(LittleEndian::readInt64(&signed_bytes[0]) == int64_t(0xf8f7f6f5f4f3f2f1LL));
-  MOZ_ASSERT(BigEndian::readInt64(&signed_bytes[0]) == int64_t(0xf1f2f3f4f5f6f7f8LL));
+  MOZ_RELEASE_ASSERT(LittleEndian::readInt64(&signed_bytes[0]) == int64_t(0xf8f7f6f5f4f3f2f1LL));
+  MOZ_RELEASE_ASSERT(BigEndian::readInt64(&signed_bytes[0]) == int64_t(0xf1f2f3f4f5f6f7f8LL));
 
   LittleEndian::writeInt16(&buffer[0], 0xf2f1);
-  MOZ_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int16_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int16_t)) == 0);
   BigEndian::writeInt16(&buffer[0], 0xf1f2);
-  MOZ_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int16_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int16_t)) == 0);
 
   LittleEndian::writeInt32(&buffer[0], 0xf4f3f2f1);
-  MOZ_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int32_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int32_t)) == 0);
   BigEndian::writeInt32(&buffer[0], 0xf1f2f3f4);
-  MOZ_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int32_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int32_t)) == 0);
 
   LittleEndian::writeInt64(&buffer[0], 0xf8f7f6f5f4f3f2f1LL);
-  MOZ_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int64_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int64_t)) == 0);
   BigEndian::writeInt64(&buffer[0], 0xf1f2f3f4f5f6f7f8LL);
-  MOZ_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int64_t)) == 0);
+  MOZ_RELEASE_ASSERT(memcmp(&signed_bytes[0], &buffer[0], sizeof(int64_t)) == 0);
 
   TestSingleSwap(uint16_t(0xf2f1), uint16_t(0xf1f2));
   TestSingleSwap(uint32_t(0xf4f3f2f1), uint32_t(0xf1f2f3f4));
   TestSingleSwap(uint64_t(0xf8f7f6f5f4f3f2f1), uint64_t(0xf1f2f3f4f5f6f7f8));
 
   TestSingleSwap(int16_t(0xf2f1), int16_t(0xf1f2));
   TestSingleSwap(int32_t(0xf4f3f2f1), int32_t(0xf1f2f3f4));
   TestSingleSwap(int64_t(0xf8f7f6f5f4f3f2f1), int64_t(0xf1f2f3f4f5f6f7f8));
--- a/mfbt/tests/TestEnumSet.cpp
+++ b/mfbt/tests/TestEnumSet.cpp
@@ -54,171 +54,171 @@ class EnumSetSuite {
       testIntersect();
       testInsersection();
       testEquality();
       testDuplicates();
     }
 
   private:
     void testSize() {
-      MOZ_ASSERT(mAlcidae.size() == 0);
-      MOZ_ASSERT(mDiomedeidae.size() == 1);
-      MOZ_ASSERT(mPetrelProcellariidae.size() == 2);
-      MOZ_ASSERT(mNonPetrelProcellariidae.size() == 3);
-      MOZ_ASSERT(mPetrels.size() == 4);
+      MOZ_RELEASE_ASSERT(mAlcidae.size() == 0);
+      MOZ_RELEASE_ASSERT(mDiomedeidae.size() == 1);
+      MOZ_RELEASE_ASSERT(mPetrelProcellariidae.size() == 2);
+      MOZ_RELEASE_ASSERT(mNonPetrelProcellariidae.size() == 3);
+      MOZ_RELEASE_ASSERT(mPetrels.size() == 4);
     }
 
     void testContains() {
-      MOZ_ASSERT(!mPetrels.contains(PENGUIN));
-      MOZ_ASSERT(!mPetrels.contains(ALBATROSS));
-      MOZ_ASSERT(!mPetrels.contains(FULMAR));
-      MOZ_ASSERT(!mPetrels.contains(PRION));
-      MOZ_ASSERT(!mPetrels.contains(SHEARWATER));
-      MOZ_ASSERT(mPetrels.contains(GADFLY_PETREL));
-      MOZ_ASSERT(mPetrels.contains(TRUE_PETREL));
-      MOZ_ASSERT(mPetrels.contains(DIVING_PETREL));
-      MOZ_ASSERT(mPetrels.contains(STORM_PETREL));
-      MOZ_ASSERT(!mPetrels.contains(PELICAN));
-      MOZ_ASSERT(!mPetrels.contains(GANNET));
-      MOZ_ASSERT(!mPetrels.contains(BOOBY));
-      MOZ_ASSERT(!mPetrels.contains(CORMORANT));
-      MOZ_ASSERT(!mPetrels.contains(FRIGATEBIRD));
-      MOZ_ASSERT(!mPetrels.contains(TROPICBIRD));
-      MOZ_ASSERT(!mPetrels.contains(SKUA));
-      MOZ_ASSERT(!mPetrels.contains(GULL));
-      MOZ_ASSERT(!mPetrels.contains(TERN));
-      MOZ_ASSERT(!mPetrels.contains(SKIMMER));
-      MOZ_ASSERT(!mPetrels.contains(AUK));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(PENGUIN));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(ALBATROSS));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(FULMAR));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(PRION));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(SHEARWATER));
+      MOZ_RELEASE_ASSERT(mPetrels.contains(GADFLY_PETREL));
+      MOZ_RELEASE_ASSERT(mPetrels.contains(TRUE_PETREL));
+      MOZ_RELEASE_ASSERT(mPetrels.contains(DIVING_PETREL));
+      MOZ_RELEASE_ASSERT(mPetrels.contains(STORM_PETREL));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(PELICAN));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(GANNET));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(BOOBY));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(CORMORANT));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(FRIGATEBIRD));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(TROPICBIRD));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(SKUA));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(GULL));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(TERN));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(SKIMMER));
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(AUK));
     }
 
     void testCopy() {
       EnumSet<SeaBird> likes = mPetrels;
       likes -= TRUE_PETREL;
-      MOZ_ASSERT(mPetrels.size() == 4);
-      MOZ_ASSERT(mPetrels.contains(TRUE_PETREL));
+      MOZ_RELEASE_ASSERT(mPetrels.size() == 4);
+      MOZ_RELEASE_ASSERT(mPetrels.contains(TRUE_PETREL));
 
-      MOZ_ASSERT(likes.size() == 3);
-      MOZ_ASSERT(likes.contains(GADFLY_PETREL));
-      MOZ_ASSERT(likes.contains(DIVING_PETREL));
-      MOZ_ASSERT(likes.contains(STORM_PETREL));
+      MOZ_RELEASE_ASSERT(likes.size() == 3);
+      MOZ_RELEASE_ASSERT(likes.contains(GADFLY_PETREL));
+      MOZ_RELEASE_ASSERT(likes.contains(DIVING_PETREL));
+      MOZ_RELEASE_ASSERT(likes.contains(STORM_PETREL));
     }
 
     void testAddTo() {
       EnumSet<SeaBird> seen = mPetrels;
       seen += CORMORANT;
       seen += TRUE_PETREL;
-      MOZ_ASSERT(mPetrels.size() == 4);
-      MOZ_ASSERT(!mPetrels.contains(CORMORANT));
-      MOZ_ASSERT(seen.size() == 5);
-      MOZ_ASSERT(seen.contains(GADFLY_PETREL));
-      MOZ_ASSERT(seen.contains(TRUE_PETREL));
-      MOZ_ASSERT(seen.contains(DIVING_PETREL));
-      MOZ_ASSERT(seen.contains(STORM_PETREL));
-      MOZ_ASSERT(seen.contains(CORMORANT));
+      MOZ_RELEASE_ASSERT(mPetrels.size() == 4);
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(CORMORANT));
+      MOZ_RELEASE_ASSERT(seen.size() == 5);
+      MOZ_RELEASE_ASSERT(seen.contains(GADFLY_PETREL));
+      MOZ_RELEASE_ASSERT(seen.contains(TRUE_PETREL));
+      MOZ_RELEASE_ASSERT(seen.contains(DIVING_PETREL));
+      MOZ_RELEASE_ASSERT(seen.contains(STORM_PETREL));
+      MOZ_RELEASE_ASSERT(seen.contains(CORMORANT));
     }
 
     void testAdd() {
       EnumSet<SeaBird> seen = mPetrels + CORMORANT +
                                          STORM_PETREL;
-      MOZ_ASSERT(mPetrels.size() == 4);
-      MOZ_ASSERT(!mPetrels.contains(CORMORANT));
-      MOZ_ASSERT(seen.size() == 5);
-      MOZ_ASSERT(seen.contains(GADFLY_PETREL));
-      MOZ_ASSERT(seen.contains(TRUE_PETREL));
-      MOZ_ASSERT(seen.contains(DIVING_PETREL));
-      MOZ_ASSERT(seen.contains(STORM_PETREL));
-      MOZ_ASSERT(seen.contains(CORMORANT));
+      MOZ_RELEASE_ASSERT(mPetrels.size() == 4);
+      MOZ_RELEASE_ASSERT(!mPetrels.contains(CORMORANT));
+      MOZ_RELEASE_ASSERT(seen.size() == 5);
+      MOZ_RELEASE_ASSERT(seen.contains(GADFLY_PETREL));
+      MOZ_RELEASE_ASSERT(seen.contains(TRUE_PETREL));
+      MOZ_RELEASE_ASSERT(seen.contains(DIVING_PETREL));
+      MOZ_RELEASE_ASSERT(seen.contains(STORM_PETREL));
+      MOZ_RELEASE_ASSERT(seen.contains(CORMORANT));
     }
 
     void testAddAll() {
       EnumSet<SeaBird> procellariidae;
       procellariidae += mPetrelProcellariidae;
       procellariidae += mNonPetrelProcellariidae;
-      MOZ_ASSERT(procellariidae.size() == 5);
+      MOZ_RELEASE_ASSERT(procellariidae.size() == 5);
 
       // Both procellariidae and mPetrels include GADFLY_PERTEL and TRUE_PETREL
       EnumSet<SeaBird> procellariiformes;
       procellariiformes += mDiomedeidae;
       procellariiformes += procellariidae;
       procellariiformes += mPetrels;
-      MOZ_ASSERT(procellariiformes.size() == 8);
+      MOZ_RELEASE_ASSERT(procellariiformes.size() == 8);
     }
 
     void testUnion() {
       EnumSet<SeaBird> procellariidae = mPetrelProcellariidae +
                                         mNonPetrelProcellariidae;
-      MOZ_ASSERT(procellariidae.size() == 5);
+      MOZ_RELEASE_ASSERT(procellariidae.size() == 5);
 
       // Both procellariidae and mPetrels include GADFLY_PETREL and TRUE_PETREL
       EnumSet<SeaBird> procellariiformes = mDiomedeidae + procellariidae +
                                            mPetrels;
-      MOZ_ASSERT(procellariiformes.size() == 8);
+      MOZ_RELEASE_ASSERT(procellariiformes.size() == 8);
     }
 
     void testRemoveFrom() {
       EnumSet<SeaBird> likes = mPetrels;
       likes -= TRUE_PETREL;
       likes -= DIVING_PETREL;
-      MOZ_ASSERT(likes.size() == 2);
-      MOZ_ASSERT(likes.contains(GADFLY_PETREL));
-      MOZ_ASSERT(likes.contains(STORM_PETREL));
+      MOZ_RELEASE_ASSERT(likes.size() == 2);
+      MOZ_RELEASE_ASSERT(likes.contains(GADFLY_PETREL));
+      MOZ_RELEASE_ASSERT(likes.contains(STORM_PETREL));
     }
 
     void testRemove() {
       EnumSet<SeaBird> likes = mPetrels - TRUE_PETREL -
                                DIVING_PETREL;
-      MOZ_ASSERT(likes.size() == 2);
-      MOZ_ASSERT(likes.contains(GADFLY_PETREL));
-      MOZ_ASSERT(likes.contains(STORM_PETREL));
+      MOZ_RELEASE_ASSERT(likes.size() == 2);
+      MOZ_RELEASE_ASSERT(likes.contains(GADFLY_PETREL));
+      MOZ_RELEASE_ASSERT(likes.contains(STORM_PETREL));
     }
 
     void testRemoveAllFrom() {
       EnumSet<SeaBird> likes = mPetrels;
       likes -= mPetrelProcellariidae;
-      MOZ_ASSERT(likes.size() == 2);
-      MOZ_ASSERT(likes.contains(DIVING_PETREL));
-      MOZ_ASSERT(likes.contains(STORM_PETREL));
+      MOZ_RELEASE_ASSERT(likes.size() == 2);
+      MOZ_RELEASE_ASSERT(likes.contains(DIVING_PETREL));
+      MOZ_RELEASE_ASSERT(likes.contains(STORM_PETREL));
     }
 
     void testRemoveAll() {
       EnumSet<SeaBird> likes = mPetrels - mPetrelProcellariidae;
-      MOZ_ASSERT(likes.size() == 2);
-      MOZ_ASSERT(likes.contains(DIVING_PETREL));
-      MOZ_ASSERT(likes.contains(STORM_PETREL));
+      MOZ_RELEASE_ASSERT(likes.size() == 2);
+      MOZ_RELEASE_ASSERT(likes.contains(DIVING_PETREL));
+      MOZ_RELEASE_ASSERT(likes.contains(STORM_PETREL));
     }
 
     void testIntersect() {
       EnumSet<SeaBird> likes = mPetrels;
       likes &= mPetrelProcellariidae;
-      MOZ_ASSERT(likes.size() == 2);
-      MOZ_ASSERT(likes.contains(GADFLY_PETREL));
-      MOZ_ASSERT(likes.contains(TRUE_PETREL));
+      MOZ_RELEASE_ASSERT(likes.size() == 2);
+      MOZ_RELEASE_ASSERT(likes.contains(GADFLY_PETREL));
+      MOZ_RELEASE_ASSERT(likes.contains(TRUE_PETREL));
     }
 
     void testInsersection() {
       EnumSet<SeaBird> likes = mPetrels & mPetrelProcellariidae;
-      MOZ_ASSERT(likes.size() == 2);
-      MOZ_ASSERT(likes.contains(GADFLY_PETREL));
-      MOZ_ASSERT(likes.contains(TRUE_PETREL));
+      MOZ_RELEASE_ASSERT(likes.size() == 2);
+      MOZ_RELEASE_ASSERT(likes.contains(GADFLY_PETREL));
+      MOZ_RELEASE_ASSERT(likes.contains(TRUE_PETREL));
     }
 
     void testEquality() {
       EnumSet<SeaBird> likes = mPetrels & mPetrelProcellariidae;
-      MOZ_ASSERT(likes == EnumSet<SeaBird>(GADFLY_PETREL,
+      MOZ_RELEASE_ASSERT(likes == EnumSet<SeaBird>(GADFLY_PETREL,
                                            TRUE_PETREL));
     }
 
     void testDuplicates() {
       EnumSet<SeaBird> likes = mPetrels;
       likes += GADFLY_PETREL;
       likes += TRUE_PETREL;
       likes += DIVING_PETREL;
       likes += STORM_PETREL;
-      MOZ_ASSERT(likes.size() == 4);
-      MOZ_ASSERT(likes == mPetrels);
+      MOZ_RELEASE_ASSERT(likes.size() == 4);
+      MOZ_RELEASE_ASSERT(likes == mPetrels);
     }
 
 
     EnumSet<SeaBird> mAlcidae;
     EnumSet<SeaBird> mDiomedeidae;
     EnumSet<SeaBird> mPetrelProcellariidae;
     EnumSet<SeaBird> mNonPetrelProcellariidae;
     EnumSet<SeaBird> mPetrels;
--- a/mfbt/tests/TestFloatingPoint.cpp
+++ b/mfbt/tests/TestFloatingPoint.cpp
@@ -23,26 +23,26 @@ using mozilla::NumbersAreIdentical;
 using mozilla::PositiveInfinity;
 using mozilla::SpecificNaN;
 using mozilla::UnspecifiedNaN;
 
 template<typename T>
 static void
 ShouldBeIdentical(T d1, T d2)
 {
-  MOZ_ASSERT(NumbersAreIdentical(d1, d2));
-  MOZ_ASSERT(NumbersAreIdentical(d2, d1));
+  MOZ_RELEASE_ASSERT(NumbersAreIdentical(d1, d2));
+  MOZ_RELEASE_ASSERT(NumbersAreIdentical(d2, d1));
 }
 
 template<typename T>
 static void
 ShouldNotBeIdentical(T d1, T d2)
 {
-  MOZ_ASSERT(!NumbersAreIdentical(d1, d2));
-  MOZ_ASSERT(!NumbersAreIdentical(d2, d1));
+  MOZ_RELEASE_ASSERT(!NumbersAreIdentical(d1, d2));
+  MOZ_RELEASE_ASSERT(!NumbersAreIdentical(d2, d1));
 }
 
 static void
 TestDoublesAreIdentical()
 {
   ShouldBeIdentical(+0.0, +0.0);
   ShouldBeIdentical(-0.0, -0.0);
   ShouldNotBeIdentical(+0.0, -0.0);
@@ -185,185 +185,185 @@ TestAreIdentical()
 {
   TestDoublesAreIdentical();
   TestFloatsAreIdentical();
 }
 
 static void
 TestDoubleExponentComponent()
 {
-  MOZ_ASSERT(ExponentComponent(0.0) == -int_fast16_t(FloatingPoint<double>::ExponentBias));
-  MOZ_ASSERT(ExponentComponent(-0.0) == -int_fast16_t(FloatingPoint<double>::ExponentBias));
-  MOZ_ASSERT(ExponentComponent(0.125) == -3);
-  MOZ_ASSERT(ExponentComponent(0.5) == -1);
-  MOZ_ASSERT(ExponentComponent(1.0) == 0);
-  MOZ_ASSERT(ExponentComponent(1.5) == 0);
-  MOZ_ASSERT(ExponentComponent(2.0) == 1);
-  MOZ_ASSERT(ExponentComponent(7.0) == 2);
-  MOZ_ASSERT(ExponentComponent(PositiveInfinity<double>()) == FloatingPoint<double>::ExponentBias + 1);
-  MOZ_ASSERT(ExponentComponent(NegativeInfinity<double>()) == FloatingPoint<double>::ExponentBias + 1);
-  MOZ_ASSERT(ExponentComponent(UnspecifiedNaN<double>()) == FloatingPoint<double>::ExponentBias + 1);
+  MOZ_RELEASE_ASSERT(ExponentComponent(0.0) == -int_fast16_t(FloatingPoint<double>::ExponentBias));
+  MOZ_RELEASE_ASSERT(ExponentComponent(-0.0) == -int_fast16_t(FloatingPoint<double>::ExponentBias));
+  MOZ_RELEASE_ASSERT(ExponentComponent(0.125) == -3);
+  MOZ_RELEASE_ASSERT(ExponentComponent(0.5) == -1);
+  MOZ_RELEASE_ASSERT(ExponentComponent(1.0) == 0);
+  MOZ_RELEASE_ASSERT(ExponentComponent(1.5) == 0);
+  MOZ_RELEASE_ASSERT(ExponentComponent(2.0) == 1);
+  MOZ_RELEASE_ASSERT(ExponentComponent(7.0) == 2);
+  MOZ_RELEASE_ASSERT(ExponentComponent(PositiveInfinity<double>()) == FloatingPoint<double>::ExponentBias + 1);
+  MOZ_RELEASE_ASSERT(ExponentComponent(NegativeInfinity<double>()) == FloatingPoint<double>::ExponentBias + 1);
+  MOZ_RELEASE_ASSERT(ExponentComponent(UnspecifiedNaN<double>()) == FloatingPoint<double>::ExponentBias + 1);
 }
 
 static void
 TestFloatExponentComponent()
 {
-  MOZ_ASSERT(ExponentComponent(0.0f) == -int_fast16_t(FloatingPoint<float>::ExponentBias));
-  MOZ_ASSERT(ExponentComponent(-0.0f) == -int_fast16_t(FloatingPoint<float>::ExponentBias));
-  MOZ_ASSERT(ExponentComponent(0.125f) == -3);
-  MOZ_ASSERT(ExponentComponent(0.5f) == -1);
-  MOZ_ASSERT(ExponentComponent(1.0f) == 0);
-  MOZ_ASSERT(ExponentComponent(1.5f) == 0);
-  MOZ_ASSERT(ExponentComponent(2.0f) == 1);
-  MOZ_ASSERT(ExponentComponent(7.0f) == 2);
-  MOZ_ASSERT(ExponentComponent(PositiveInfinity<float>()) == FloatingPoint<float>::ExponentBias + 1);
-  MOZ_ASSERT(ExponentComponent(NegativeInfinity<float>()) == FloatingPoint<float>::ExponentBias + 1);
-  MOZ_ASSERT(ExponentComponent(UnspecifiedNaN<float>()) == FloatingPoint<float>::ExponentBias + 1);
+  MOZ_RELEASE_ASSERT(ExponentComponent(0.0f) == -int_fast16_t(FloatingPoint<float>::ExponentBias));
+  MOZ_RELEASE_ASSERT(ExponentComponent(-0.0f) == -int_fast16_t(FloatingPoint<float>::ExponentBias));
+  MOZ_RELEASE_ASSERT(ExponentComponent(0.125f) == -3);
+  MOZ_RELEASE_ASSERT(ExponentComponent(0.5f) == -1);
+  MOZ_RELEASE_ASSERT(ExponentComponent(1.0f) == 0);
+  MOZ_RELEASE_ASSERT(ExponentComponent(1.5f) == 0);
+  MOZ_RELEASE_ASSERT(ExponentComponent(2.0f) == 1);
+  MOZ_RELEASE_ASSERT(ExponentComponent(7.0f) == 2);
+  MOZ_RELEASE_ASSERT(ExponentComponent(PositiveInfinity<float>()) == FloatingPoint<float>::ExponentBias + 1);
+  MOZ_RELEASE_ASSERT(ExponentComponent(NegativeInfinity<float>()) == FloatingPoint<float>::ExponentBias + 1);
+  MOZ_RELEASE_ASSERT(ExponentComponent(UnspecifiedNaN<float>()) == FloatingPoint<float>::ExponentBias + 1);
 }
 
 static void
 TestExponentComponent()
 {
   TestDoubleExponentComponent();
   TestFloatExponentComponent();
 }
 
 static void
 TestDoublesPredicates()
 {
-  MOZ_ASSERT(IsNaN(UnspecifiedNaN<double>()));
-  MOZ_ASSERT(IsNaN(SpecificNaN<double>(1, 17)));;
-  MOZ_ASSERT(IsNaN(SpecificNaN<double>(0, 0xfffffffffff0fULL)));
-  MOZ_ASSERT(!IsNaN(0.0));
-  MOZ_ASSERT(!IsNaN(-0.0));
-  MOZ_ASSERT(!IsNaN(1.0));
-  MOZ_ASSERT(!IsNaN(PositiveInfinity<double>()));
-  MOZ_ASSERT(!IsNaN(NegativeInfinity<double>()));
+  MOZ_RELEASE_ASSERT(IsNaN(UnspecifiedNaN<double>()));
+  MOZ_RELEASE_ASSERT(IsNaN(SpecificNaN<double>(1, 17)));;
+  MOZ_RELEASE_ASSERT(IsNaN(SpecificNaN<double>(0, 0xfffffffffff0fULL)));
+  MOZ_RELEASE_ASSERT(!IsNaN(0.0));
+  MOZ_RELEASE_ASSERT(!IsNaN(-0.0));
+  MOZ_RELEASE_ASSERT(!IsNaN(1.0));
+  MOZ_RELEASE_ASSERT(!IsNaN(PositiveInfinity<double>()));
+  MOZ_RELEASE_ASSERT(!IsNaN(NegativeInfinity<double>()));
 
-  MOZ_ASSERT(IsInfinite(PositiveInfinity<double>()));
-  MOZ_ASSERT(IsInfinite(NegativeInfinity<double>()));
-  MOZ_ASSERT(!IsInfinite(UnspecifiedNaN<double>()));
-  MOZ_ASSERT(!IsInfinite(0.0));
-  MOZ_ASSERT(!IsInfinite(-0.0));
-  MOZ_ASSERT(!IsInfinite(1.0));
+  MOZ_RELEASE_ASSERT(IsInfinite(PositiveInfinity<double>()));
+  MOZ_RELEASE_ASSERT(IsInfinite(NegativeInfinity<double>()));
+  MOZ_RELEASE_ASSERT(!IsInfinite(UnspecifiedNaN<double>()));
+  MOZ_RELEASE_ASSERT(!IsInfinite(0.0));
+  MOZ_RELEASE_ASSERT(!IsInfinite(-0.0));
+  MOZ_RELEASE_ASSERT(!IsInfinite(1.0));
 
-  MOZ_ASSERT(!IsFinite(PositiveInfinity<double>()));
-  MOZ_ASSERT(!IsFinite(NegativeInfinity<double>()));
-  MOZ_ASSERT(!IsFinite(UnspecifiedNaN<double>()));
-  MOZ_ASSERT(IsFinite(0.0));
-  MOZ_ASSERT(IsFinite(-0.0));
-  MOZ_ASSERT(IsFinite(1.0));
+  MOZ_RELEASE_ASSERT(!IsFinite(PositiveInfinity<double>()));
+  MOZ_RELEASE_ASSERT(!IsFinite(NegativeInfinity<double>()));
+  MOZ_RELEASE_ASSERT(!IsFinite(UnspecifiedNaN<double>()));
+  MOZ_RELEASE_ASSERT(IsFinite(0.0));
+  MOZ_RELEASE_ASSERT(IsFinite(-0.0));
+  MOZ_RELEASE_ASSERT(IsFinite(1.0));
 
-  MOZ_ASSERT(!IsNegative(PositiveInfinity<double>()));
-  MOZ_ASSERT(IsNegative(NegativeInfinity<double>()));
-  MOZ_ASSERT(IsNegative(-0.0));
-  MOZ_ASSERT(!IsNegative(0.0));
-  MOZ_ASSERT(IsNegative(-1.0));
-  MOZ_ASSERT(!IsNegative(1.0));
+  MOZ_RELEASE_ASSERT(!IsNegative(PositiveInfinity<double>()));
+  MOZ_RELEASE_ASSERT(IsNegative(NegativeInfinity<double>()));
+  MOZ_RELEASE_ASSERT(IsNegative(-0.0));
+  MOZ_RELEASE_ASSERT(!IsNegative(0.0));
+  MOZ_RELEASE_ASSERT(IsNegative(-1.0));
+  MOZ_RELEASE_ASSERT(!IsNegative(1.0));
 
-  MOZ_ASSERT(!IsNegativeZero(PositiveInfinity<double>()));
-  MOZ_ASSERT(!IsNegativeZero(NegativeInfinity<double>()));
-  MOZ_ASSERT(!IsNegativeZero(SpecificNaN<double>(1, 17)));;
-  MOZ_ASSERT(!IsNegativeZero(SpecificNaN<double>(1, 0xfffffffffff0fULL)));
-  MOZ_ASSERT(!IsNegativeZero(SpecificNaN<double>(0, 17)));;
-  MOZ_ASSERT(!IsNegativeZero(SpecificNaN<double>(0, 0xfffffffffff0fULL)));
-  MOZ_ASSERT(!IsNegativeZero(UnspecifiedNaN<double>()));
-  MOZ_ASSERT(IsNegativeZero(-0.0));
-  MOZ_ASSERT(!IsNegativeZero(0.0));
-  MOZ_ASSERT(!IsNegativeZero(-1.0));
-  MOZ_ASSERT(!IsNegativeZero(1.0));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(PositiveInfinity<double>()));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(NegativeInfinity<double>()));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(SpecificNaN<double>(1, 17)));;
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(SpecificNaN<double>(1, 0xfffffffffff0fULL)));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(SpecificNaN<double>(0, 17)));;
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(SpecificNaN<double>(0, 0xfffffffffff0fULL)));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(UnspecifiedNaN<double>()));
+  MOZ_RELEASE_ASSERT(IsNegativeZero(-0.0));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(0.0));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(-1.0));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(1.0));
 
   int32_t i;
-  MOZ_ASSERT(NumberIsInt32(0.0, &i)); MOZ_ASSERT(i == 0);
-  MOZ_ASSERT(!NumberIsInt32(-0.0, &i));
-  MOZ_ASSERT(NumberEqualsInt32(0.0, &i)); MOZ_ASSERT(i == 0);
-  MOZ_ASSERT(NumberEqualsInt32(-0.0, &i)); MOZ_ASSERT(i == 0);
-  MOZ_ASSERT(NumberIsInt32(double(INT32_MIN), &i)); MOZ_ASSERT(i == INT32_MIN);
-  MOZ_ASSERT(NumberIsInt32(double(INT32_MAX), &i)); MOZ_ASSERT(i == INT32_MAX);
-  MOZ_ASSERT(NumberEqualsInt32(double(INT32_MIN), &i)); MOZ_ASSERT(i == INT32_MIN);
-  MOZ_ASSERT(NumberEqualsInt32(double(INT32_MAX), &i)); MOZ_ASSERT(i == INT32_MAX);
-  MOZ_ASSERT(!NumberIsInt32(0.5, &i));
-  MOZ_ASSERT(!NumberIsInt32(double(INT32_MAX) + 0.1, &i));
-  MOZ_ASSERT(!NumberIsInt32(double(INT32_MIN) - 0.1, &i));
-  MOZ_ASSERT(!NumberIsInt32(NegativeInfinity<double>(), &i));
-  MOZ_ASSERT(!NumberIsInt32(PositiveInfinity<double>(), &i));
-  MOZ_ASSERT(!NumberIsInt32(UnspecifiedNaN<double>(), &i));
-  MOZ_ASSERT(!NumberEqualsInt32(0.5, &i));
-  MOZ_ASSERT(!NumberEqualsInt32(double(INT32_MAX) + 0.1, &i));
-  MOZ_ASSERT(!NumberEqualsInt32(double(INT32_MIN) - 0.1, &i));
-  MOZ_ASSERT(!NumberEqualsInt32(NegativeInfinity<double>(), &i));
-  MOZ_ASSERT(!NumberEqualsInt32(PositiveInfinity<double>(), &i));
-  MOZ_ASSERT(!NumberEqualsInt32(UnspecifiedNaN<double>(), &i));
+  MOZ_RELEASE_ASSERT(NumberIsInt32(0.0, &i)); MOZ_RELEASE_ASSERT(i == 0);
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(-0.0, &i));
+  MOZ_RELEASE_ASSERT(NumberEqualsInt32(0.0, &i)); MOZ_RELEASE_ASSERT(i == 0);
+  MOZ_RELEASE_ASSERT(NumberEqualsInt32(-0.0, &i)); MOZ_RELEASE_ASSERT(i == 0);
+  MOZ_RELEASE_ASSERT(NumberIsInt32(double(INT32_MIN), &i)); MOZ_RELEASE_ASSERT(i == INT32_MIN);
+  MOZ_RELEASE_ASSERT(NumberIsInt32(double(INT32_MAX), &i)); MOZ_RELEASE_ASSERT(i == INT32_MAX);
+  MOZ_RELEASE_ASSERT(NumberEqualsInt32(double(INT32_MIN), &i)); MOZ_RELEASE_ASSERT(i == INT32_MIN);
+  MOZ_RELEASE_ASSERT(NumberEqualsInt32(double(INT32_MAX), &i)); MOZ_RELEASE_ASSERT(i == INT32_MAX);
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(0.5, &i));
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(double(INT32_MAX) + 0.1, &i));
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(double(INT32_MIN) - 0.1, &i));
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(NegativeInfinity<double>(), &i));
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(PositiveInfinity<double>(), &i));
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(UnspecifiedNaN<double>(), &i));
+  MOZ_RELEASE_ASSERT(!NumberEqualsInt32(0.5, &i));
+  MOZ_RELEASE_ASSERT(!NumberEqualsInt32(double(INT32_MAX) + 0.1, &i));
+  MOZ_RELEASE_ASSERT(!NumberEqualsInt32(double(INT32_MIN) - 0.1, &i));
+  MOZ_RELEASE_ASSERT(!NumberEqualsInt32(NegativeInfinity<double>(), &i));
+  MOZ_RELEASE_ASSERT(!NumberEqualsInt32(PositiveInfinity<double>(), &i));
+  MOZ_RELEASE_ASSERT(!NumberEqualsInt32(UnspecifiedNaN<double>(), &i));
 }
 
 static void
 TestFloatsPredicates()
 {
-  MOZ_ASSERT(IsNaN(UnspecifiedNaN<float>()));
-  MOZ_ASSERT(IsNaN(SpecificNaN<float>(1, 17)));;
-  MOZ_ASSERT(IsNaN(SpecificNaN<float>(0, 0x7fff0fUL)));
-  MOZ_ASSERT(!IsNaN(0.0f));
-  MOZ_ASSERT(!IsNaN(-0.0f));
-  MOZ_ASSERT(!IsNaN(1.0f));
-  MOZ_ASSERT(!IsNaN(PositiveInfinity<float>()));
-  MOZ_ASSERT(!IsNaN(NegativeInfinity<float>()));
+  MOZ_RELEASE_ASSERT(IsNaN(UnspecifiedNaN<float>()));
+  MOZ_RELEASE_ASSERT(IsNaN(SpecificNaN<float>(1, 17)));;
+  MOZ_RELEASE_ASSERT(IsNaN(SpecificNaN<float>(0, 0x7fff0fUL)));
+  MOZ_RELEASE_ASSERT(!IsNaN(0.0f));
+  MOZ_RELEASE_ASSERT(!IsNaN(-0.0f));
+  MOZ_RELEASE_ASSERT(!IsNaN(1.0f));
+  MOZ_RELEASE_ASSERT(!IsNaN(PositiveInfinity<float>()));
+  MOZ_RELEASE_ASSERT(!IsNaN(NegativeInfinity<float>()));
 
-  MOZ_ASSERT(IsInfinite(PositiveInfinity<float>()));
-  MOZ_ASSERT(IsInfinite(NegativeInfinity<float>()));
-  MOZ_ASSERT(!IsInfinite(UnspecifiedNaN<float>()));
-  MOZ_ASSERT(!IsInfinite(0.0f));
-  MOZ_ASSERT(!IsInfinite(-0.0f));
-  MOZ_ASSERT(!IsInfinite(1.0f));
+  MOZ_RELEASE_ASSERT(IsInfinite(PositiveInfinity<float>()));
+  MOZ_RELEASE_ASSERT(IsInfinite(NegativeInfinity<float>()));
+  MOZ_RELEASE_ASSERT(!IsInfinite(UnspecifiedNaN<float>()));
+  MOZ_RELEASE_ASSERT(!IsInfinite(0.0f));
+  MOZ_RELEASE_ASSERT(!IsInfinite(-0.0f));
+  MOZ_RELEASE_ASSERT(!IsInfinite(1.0f));
 
-  MOZ_ASSERT(!IsFinite(PositiveInfinity<float>()));
-  MOZ_ASSERT(!IsFinite(NegativeInfinity<float>()));
-  MOZ_ASSERT(!IsFinite(UnspecifiedNaN<float>()));
-  MOZ_ASSERT(IsFinite(0.0f));
-  MOZ_ASSERT(IsFinite(-0.0f));
-  MOZ_ASSERT(IsFinite(1.0f));
+  MOZ_RELEASE_ASSERT(!IsFinite(PositiveInfinity<float>()));
+  MOZ_RELEASE_ASSERT(!IsFinite(NegativeInfinity<float>()));
+  MOZ_RELEASE_ASSERT(!IsFinite(UnspecifiedNaN<float>()));
+  MOZ_RELEASE_ASSERT(IsFinite(0.0f));
+  MOZ_RELEASE_ASSERT(IsFinite(-0.0f));
+  MOZ_RELEASE_ASSERT(IsFinite(1.0f));
 
-  MOZ_ASSERT(!IsNegative(PositiveInfinity<float>()));
-  MOZ_ASSERT(IsNegative(NegativeInfinity<float>()));
-  MOZ_ASSERT(IsNegative(-0.0f));
-  MOZ_ASSERT(!IsNegative(0.0f));
-  MOZ_ASSERT(IsNegative(-1.0f));
-  MOZ_ASSERT(!IsNegative(1.0f));
+  MOZ_RELEASE_ASSERT(!IsNegative(PositiveInfinity<float>()));
+  MOZ_RELEASE_ASSERT(IsNegative(NegativeInfinity<float>()));
+  MOZ_RELEASE_ASSERT(IsNegative(-0.0f));
+  MOZ_RELEASE_ASSERT(!IsNegative(0.0f));
+  MOZ_RELEASE_ASSERT(IsNegative(-1.0f));
+  MOZ_RELEASE_ASSERT(!IsNegative(1.0f));
 
-  MOZ_ASSERT(!IsNegativeZero(PositiveInfinity<float>()));
-  MOZ_ASSERT(!IsNegativeZero(NegativeInfinity<float>()));
-  MOZ_ASSERT(!IsNegativeZero(SpecificNaN<float>(1, 17)));;
-  MOZ_ASSERT(!IsNegativeZero(SpecificNaN<float>(1, 0x7fff0fUL)));
-  MOZ_ASSERT(!IsNegativeZero(SpecificNaN<float>(0, 17)));;
-  MOZ_ASSERT(!IsNegativeZero(SpecificNaN<float>(0, 0x7fff0fUL)));
-  MOZ_ASSERT(!IsNegativeZero(UnspecifiedNaN<float>()));
-  MOZ_ASSERT(IsNegativeZero(-0.0f));
-  MOZ_ASSERT(!IsNegativeZero(0.0f));
-  MOZ_ASSERT(!IsNegativeZero(-1.0f));
-  MOZ_ASSERT(!IsNegativeZero(1.0f));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(PositiveInfinity<float>()));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(NegativeInfinity<float>()));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(SpecificNaN<float>(1, 17)));;
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(SpecificNaN<float>(1, 0x7fff0fUL)));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(SpecificNaN<float>(0, 17)));;
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(SpecificNaN<float>(0, 0x7fff0fUL)));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(UnspecifiedNaN<float>()));
+  MOZ_RELEASE_ASSERT(IsNegativeZero(-0.0f));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(0.0f));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(-1.0f));
+  MOZ_RELEASE_ASSERT(!IsNegativeZero(1.0f));
 
   int32_t i;
   const int32_t BIG = 2097151;
-  MOZ_ASSERT(NumberIsInt32(0.0f, &i)); MOZ_ASSERT(i == 0);
-  MOZ_ASSERT(!NumberIsInt32(-0.0f, &i));
-  MOZ_ASSERT(NumberEqualsInt32(0.0f, &i)); MOZ_ASSERT(i == 0);
-  MOZ_ASSERT(NumberEqualsInt32(-0.0f, &i)); MOZ_ASSERT(i == 0);
-  MOZ_ASSERT(NumberIsInt32(float(INT32_MIN), &i)); MOZ_ASSERT(i == INT32_MIN);
-  MOZ_ASSERT(NumberIsInt32(float(BIG), &i)); MOZ_ASSERT(i == BIG);
-  MOZ_ASSERT(NumberEqualsInt32(float(INT32_MIN), &i)); MOZ_ASSERT(i == INT32_MIN);
-  MOZ_ASSERT(NumberEqualsInt32(float(BIG), &i)); MOZ_ASSERT(i == BIG);
-  MOZ_ASSERT(!NumberIsInt32(0.5f, &i));
-  MOZ_ASSERT(!NumberIsInt32(float(BIG) + 0.1f, &i));
-  MOZ_ASSERT(!NumberIsInt32(NegativeInfinity<float>(), &i));
-  MOZ_ASSERT(!NumberIsInt32(PositiveInfinity<float>(), &i));
-  MOZ_ASSERT(!NumberIsInt32(UnspecifiedNaN<float>(), &i));
-  MOZ_ASSERT(!NumberEqualsInt32(0.5f, &i));
-  MOZ_ASSERT(!NumberEqualsInt32(float(BIG) + 0.1f, &i));
-  MOZ_ASSERT(!NumberEqualsInt32(NegativeInfinity<float>(), &i));
-  MOZ_ASSERT(!NumberEqualsInt32(PositiveInfinity<float>(), &i));
-  MOZ_ASSERT(!NumberEqualsInt32(UnspecifiedNaN<float>(), &i));
+  MOZ_RELEASE_ASSERT(NumberIsInt32(0.0f, &i)); MOZ_RELEASE_ASSERT(i == 0);
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(-0.0f, &i));
+  MOZ_RELEASE_ASSERT(NumberEqualsInt32(0.0f, &i)); MOZ_RELEASE_ASSERT(i == 0);
+  MOZ_RELEASE_ASSERT(NumberEqualsInt32(-0.0f, &i)); MOZ_RELEASE_ASSERT(i == 0);
+  MOZ_RELEASE_ASSERT(NumberIsInt32(float(INT32_MIN), &i)); MOZ_RELEASE_ASSERT(i == INT32_MIN);
+  MOZ_RELEASE_ASSERT(NumberIsInt32(float(BIG), &i)); MOZ_RELEASE_ASSERT(i == BIG);
+  MOZ_RELEASE_ASSERT(NumberEqualsInt32(float(INT32_MIN), &i)); MOZ_RELEASE_ASSERT(i == INT32_MIN);
+  MOZ_RELEASE_ASSERT(NumberEqualsInt32(float(BIG), &i)); MOZ_RELEASE_ASSERT(i == BIG);
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(0.5f, &i));
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(float(BIG) + 0.1f, &i));
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(NegativeInfinity<float>(), &i));
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(PositiveInfinity<float>(), &i));
+  MOZ_RELEASE_ASSERT(!NumberIsInt32(UnspecifiedNaN<float>(), &i));
+  MOZ_RELEASE_ASSERT(!NumberEqualsInt32(0.5f, &i));
+  MOZ_RELEASE_ASSERT(!NumberEqualsInt32(float(BIG) + 0.1f, &i));
+  MOZ_RELEASE_ASSERT(!NumberEqualsInt32(NegativeInfinity<float>(), &i));
+  MOZ_RELEASE_ASSERT(!NumberEqualsInt32(PositiveInfinity<float>(), &i));
+  MOZ_RELEASE_ASSERT(!NumberEqualsInt32(UnspecifiedNaN<float>(), &i));
 }
 
 static void
 TestPredicates()
 {
   TestFloatsPredicates();
   TestDoublesPredicates();
 }
@@ -372,143 +372,143 @@ static void
 TestFloatsAreApproximatelyEqual()
 {
   float epsilon = mozilla::detail::FuzzyEqualsEpsilon<float>::value();
   float lessThanEpsilon = epsilon / 2.0f;
   float moreThanEpsilon = epsilon * 2.0f;
 
   // Additive tests using the default epsilon
   // ... around 1.0
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0f, 1.0f + lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0f, 1.0f - lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0f, 1.0f + epsilon));
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0f, 1.0f - epsilon));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0f, 1.0f + moreThanEpsilon));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0f, 1.0f - moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0f, 1.0f + lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0f, 1.0f - lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0f, 1.0f + epsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0f, 1.0f - epsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0f, 1.0f + moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0f, 1.0f - moreThanEpsilon));
   // ... around 1.0e2 (this is near the upper bound of the range where
   // adding moreThanEpsilon will still be representable and return false)
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e2f, 1.0e2f + lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e2f, 1.0e2f + epsilon));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0e2f, 1.0e2f + moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e2f, 1.0e2f + lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e2f, 1.0e2f + epsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0e2f, 1.0e2f + moreThanEpsilon));
   // ... around 1.0e-10
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e-10f, 1.0e-10f + lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e-10f, 1.0e-10f + epsilon));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0e-10f, 1.0e-10f + moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e-10f, 1.0e-10f + lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e-10f, 1.0e-10f + epsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0e-10f, 1.0e-10f + moreThanEpsilon));
   // ... straddling 0
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e-6f, -1.0e-6f));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0e-5f, -1.0e-5f));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e-6f, -1.0e-6f));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0e-5f, -1.0e-5f));
   // Using a small epsilon
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e-5f, 1.0e-5f + 1.0e-10f, 1.0e-9f));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0e-5f, 1.0e-5f + 1.0e-10f, 1.0e-11f));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e-5f, 1.0e-5f + 1.0e-10f, 1.0e-9f));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0e-5f, 1.0e-5f + 1.0e-10f, 1.0e-11f));
   // Using a big epsilon
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e20f, 1.0e20f + 1.0e15f, 1.0e16f));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0e20f, 1.0e20f + 1.0e15f, 1.0e14f));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e20f, 1.0e20f + 1.0e15f, 1.0e16f));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0e20f, 1.0e20f + 1.0e15f, 1.0e14f));
 
   // Multiplicative tests using the default epsilon
   // ... around 1.0
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0f, 1.0f + lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0f, 1.0f - lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0f, 1.0f + epsilon));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0f, 1.0f - epsilon));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0f, 1.0f + moreThanEpsilon));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0f, 1.0f - moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0f, 1.0f + lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0f, 1.0f - lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0f, 1.0f + epsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0f, 1.0f - epsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0f, 1.0f + moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0f, 1.0f - moreThanEpsilon));
   // ... around 1.0e10
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0e10f, 1.0e10f + (lessThanEpsilon * 1.0e10f)));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0e10f, 1.0e10f + (moreThanEpsilon * 1.0e10f)));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0e10f, 1.0e10f + (lessThanEpsilon * 1.0e10f)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0e10f, 1.0e10f + (moreThanEpsilon * 1.0e10f)));
   // ... around 1.0e-10
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0e-10f, 1.0e-10f + (lessThanEpsilon * 1.0e-10f)));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0e-10f, 1.0e-10f + (moreThanEpsilon * 1.0e-10f)));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0e-10f, 1.0e-10f + (lessThanEpsilon * 1.0e-10f)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0e-10f, 1.0e-10f + (moreThanEpsilon * 1.0e-10f)));
   // ... straddling 0
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0e-6f, -1.0e-6f));
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0e-6f, -1.0e-6f, 1.0e2f));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0e-6f, -1.0e-6f));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0e-6f, -1.0e-6f, 1.0e2f));
   // Using a small epsilon
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0e-5f, 1.0e-5f + 1.0e-10f, 1.0e-4f));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0e-5f, 1.0e-5f + 1.0e-10f, 1.0e-5f));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0e-5f, 1.0e-5f + 1.0e-10f, 1.0e-4f));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0e-5f, 1.0e-5f + 1.0e-10f, 1.0e-5f));
   // Using a big epsilon
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0f, 2.0f, 1.0f));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0f, 2.0f, 0.1f));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0f, 2.0f, 1.0f));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0f, 2.0f, 0.1f));
 
   // "real world case"
   float oneThird = 10.0f / 3.0f;
-  MOZ_ASSERT(FuzzyEqualsAdditive(10.0f, 3.0f * oneThird));
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(10.0f, 3.0f * oneThird));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(10.0f, 3.0f * oneThird));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(10.0f, 3.0f * oneThird));
   // NaN check
-  MOZ_ASSERT(!FuzzyEqualsAdditive(SpecificNaN<float>(1, 1), SpecificNaN<float>(1, 1)));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(SpecificNaN<float>(1, 2), SpecificNaN<float>(0, 8)));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(SpecificNaN<float>(1, 1), SpecificNaN<float>(1, 1)));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(SpecificNaN<float>(1, 2), SpecificNaN<float>(0, 200)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(SpecificNaN<float>(1, 1), SpecificNaN<float>(1, 1)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(SpecificNaN<float>(1, 2), SpecificNaN<float>(0, 8)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(SpecificNaN<float>(1, 1), SpecificNaN<float>(1, 1)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(SpecificNaN<float>(1, 2), SpecificNaN<float>(0, 200)));
 }
 
 static void
 TestDoublesAreApproximatelyEqual()
 {
   double epsilon = mozilla::detail::FuzzyEqualsEpsilon<double>::value();
   double lessThanEpsilon = epsilon / 2.0;
   double moreThanEpsilon = epsilon * 2.0;
 
   // Additive tests using the default epsilon
   // ... around 1.0
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0, 1.0 + lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0, 1.0 - lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0, 1.0 + epsilon));
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0, 1.0 - epsilon));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0, 1.0 + moreThanEpsilon));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0, 1.0 - moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0, 1.0 + lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0, 1.0 - lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0, 1.0 + epsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0, 1.0 - epsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0, 1.0 + moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0, 1.0 - moreThanEpsilon));
   // ... around 1.0e4 (this is near the upper bound of the range where
   // adding moreThanEpsilon will still be representable and return false)
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e4, 1.0e4 + lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e4, 1.0e4 + epsilon));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0e4, 1.0e4 + moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e4, 1.0e4 + lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e4, 1.0e4 + epsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0e4, 1.0e4 + moreThanEpsilon));
   // ... around 1.0e-25
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e-25, 1.0e-25 + lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e-25, 1.0e-25 + epsilon));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0e-25, 1.0e-25 + moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e-25, 1.0e-25 + lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e-25, 1.0e-25 + epsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0e-25, 1.0e-25 + moreThanEpsilon));
   // ... straddling 0
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e-13, -1.0e-13));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0e-12, -1.0e-12));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e-13, -1.0e-13));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0e-12, -1.0e-12));
   // Using a small epsilon
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e-15, 1.0e-15 + 1.0e-30, 1.0e-29));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0e-15, 1.0e-15 + 1.0e-30, 1.0e-31));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e-15, 1.0e-15 + 1.0e-30, 1.0e-29));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0e-15, 1.0e-15 + 1.0e-30, 1.0e-31));
   // Using a big epsilon
-  MOZ_ASSERT(FuzzyEqualsAdditive(1.0e40, 1.0e40 + 1.0e25, 1.0e26));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(1.0e40, 1.0e40 + 1.0e25, 1.0e24));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(1.0e40, 1.0e40 + 1.0e25, 1.0e26));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(1.0e40, 1.0e40 + 1.0e25, 1.0e24));
 
   // Multiplicative tests using the default epsilon
   // ... around 1.0
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0, 1.0 + lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0, 1.0 - lessThanEpsilon));
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0, 1.0 + epsilon));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0, 1.0 - epsilon));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0, 1.0 + moreThanEpsilon));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0, 1.0 - moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0, 1.0 + lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0, 1.0 - lessThanEpsilon));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0, 1.0 + epsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0, 1.0 - epsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0, 1.0 + moreThanEpsilon));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0, 1.0 - moreThanEpsilon));
   // ... around 1.0e30
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0e30, 1.0e30 + (lessThanEpsilon * 1.0e30)));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0e30, 1.0e30 + (moreThanEpsilon * 1.0e30)));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0e30, 1.0e30 + (lessThanEpsilon * 1.0e30)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0e30, 1.0e30 + (moreThanEpsilon * 1.0e30)));
   // ... around 1.0e-30
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0e-30, 1.0e-30 + (lessThanEpsilon * 1.0e-30)));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0e-30, 1.0e-30 + (moreThanEpsilon * 1.0e-30)));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0e-30, 1.0e-30 + (lessThanEpsilon * 1.0e-30)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0e-30, 1.0e-30 + (moreThanEpsilon * 1.0e-30)));
   // ... straddling 0
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0e-6, -1.0e-6));
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0e-6, -1.0e-6, 1.0e2));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0e-6, -1.0e-6));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0e-6, -1.0e-6, 1.0e2));
   // Using a small epsilon
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0e-15, 1.0e-15 + 1.0e-30, 1.0e-15));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0e-15, 1.0e-15 + 1.0e-30, 1.0e-16));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0e-15, 1.0e-15 + 1.0e-30, 1.0e-15));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0e-15, 1.0e-15 + 1.0e-30, 1.0e-16));
   // Using a big epsilon
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(1.0e40, 2.0e40, 1.0));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(1.0e40, 2.0e40, 0.1));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(1.0e40, 2.0e40, 1.0));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(1.0e40, 2.0e40, 0.1));
 
   // "real world case"
   double oneThird = 10.0 / 3.0;
-  MOZ_ASSERT(FuzzyEqualsAdditive(10.0, 3.0 * oneThird));
-  MOZ_ASSERT(FuzzyEqualsMultiplicative(10.0, 3.0 * oneThird));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsAdditive(10.0, 3.0 * oneThird));
+  MOZ_RELEASE_ASSERT(FuzzyEqualsMultiplicative(10.0, 3.0 * oneThird));
   // NaN check
-  MOZ_ASSERT(!FuzzyEqualsAdditive(SpecificNaN<double>(1, 1), SpecificNaN<double>(1, 1)));
-  MOZ_ASSERT(!FuzzyEqualsAdditive(SpecificNaN<double>(1, 2), SpecificNaN<double>(0, 8)));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(SpecificNaN<double>(1, 1), SpecificNaN<double>(1, 1)));
-  MOZ_ASSERT(!FuzzyEqualsMultiplicative(SpecificNaN<double>(1, 2), SpecificNaN<double>(0, 200)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(SpecificNaN<double>(1, 1), SpecificNaN<double>(1, 1)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsAdditive(SpecificNaN<double>(1, 2), SpecificNaN<double>(0, 8)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(SpecificNaN<double>(1, 1), SpecificNaN<double>(1, 1)));
+  MOZ_RELEASE_ASSERT(!FuzzyEqualsMultiplicative(SpecificNaN<double>(1, 2), SpecificNaN<double>(0, 200)));
 }
 
 static void
 TestAreApproximatelyEqual()
 {
   TestFloatsAreApproximatelyEqual();
   TestDoublesAreApproximatelyEqual();
 }
--- a/mfbt/tests/TestIntegerPrintfMacros.cpp
+++ b/mfbt/tests/TestIntegerPrintfMacros.cpp
@@ -28,204 +28,204 @@ PoisonOutput()
  * In these names N is the width of the type as described in C99 7.18.1.
  */
 
 static void
 TestPrintSigned8()
 {
   PoisonOutput();
   sprintf(output, "%" PRId8, int8_t(-17));
-  MOZ_ASSERT(!strcmp(output, "-17"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-17"));
 
   PoisonOutput();
   sprintf(output, "%" PRIi8, int8_t(42));
-  MOZ_ASSERT(!strcmp(output, "42"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "42"));
 }
 
 static void
 TestPrintSigned16()
 {
   PoisonOutput();
   sprintf(output, "%" PRId16, int16_t(-289));
-  MOZ_ASSERT(!strcmp(output, "-289"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-289"));
 
   PoisonOutput();
   sprintf(output, "%" PRIi16, int16_t(728));
-  MOZ_ASSERT(!strcmp(output, "728"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "728"));
 }
 
 static void
 TestPrintSigned32()
 {
   PoisonOutput();
   sprintf(output, "%" PRId32, int32_t(-342178));
-  MOZ_ASSERT(!strcmp(output, "-342178"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-342178"));
 
   PoisonOutput();
   sprintf(output, "%" PRIi32, int32_t(5719283));
-  MOZ_ASSERT(!strcmp(output, "5719283"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "5719283"));
 }
 
 static void
 TestPrintSigned64()
 {
   PoisonOutput();
   sprintf(output, "%" PRId64, int64_t(-INT64_C(432157943248732)));
-  MOZ_ASSERT(!strcmp(output, "-432157943248732"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-432157943248732"));
 
   PoisonOutput();
   sprintf(output, "%" PRIi64, int64_t(INT64_C(325719232983)));
-  MOZ_ASSERT(!strcmp(output, "325719232983"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "325719232983"));
 }
 
 static void
 TestPrintSignedN()
 {
   TestPrintSigned8();
   TestPrintSigned16();
   TestPrintSigned32();
   TestPrintSigned64();
 }
 
 static void
 TestPrintSignedLeast8()
 {
   PoisonOutput();
   sprintf(output, "%" PRIdLEAST8, int_least8_t(-17));
-  MOZ_ASSERT(!strcmp(output, "-17"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-17"));
 
   PoisonOutput();
   sprintf(output, "%" PRIiLEAST8, int_least8_t(42));
-  MOZ_ASSERT(!strcmp(output, "42"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "42"));
 }
 
 static void
 TestPrintSignedLeast16()
 {
   PoisonOutput();
   sprintf(output, "%" PRIdLEAST16, int_least16_t(-289));
-  MOZ_ASSERT(!strcmp(output, "-289"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-289"));
 
   PoisonOutput();
   sprintf(output, "%" PRIiLEAST16, int_least16_t(728));
-  MOZ_ASSERT(!strcmp(output, "728"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "728"));
 }
 
 static void
 TestPrintSignedLeast32()
 {
   PoisonOutput();
   sprintf(output, "%" PRIdLEAST32, int_least32_t(-342178));
-  MOZ_ASSERT(!strcmp(output, "-342178"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-342178"));
 
   PoisonOutput();
   sprintf(output, "%" PRIiLEAST32, int_least32_t(5719283));
-  MOZ_ASSERT(!strcmp(output, "5719283"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "5719283"));
 }
 
 static void
 TestPrintSignedLeast64()
 {
   PoisonOutput();
   sprintf(output, "%" PRIdLEAST64, int_least64_t(-INT64_C(432157943248732)));
-  MOZ_ASSERT(!strcmp(output, "-432157943248732"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-432157943248732"));
 
   PoisonOutput();
   sprintf(output, "%" PRIiLEAST64, int_least64_t(INT64_C(325719232983)));
-  MOZ_ASSERT(!strcmp(output, "325719232983"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "325719232983"));
 }
 
 static void
 TestPrintSignedLeastN()
 {
   TestPrintSignedLeast8();
   TestPrintSignedLeast16();
   TestPrintSignedLeast32();
   TestPrintSignedLeast64();
 }
 
 static void
 TestPrintSignedFast8()
 {
   PoisonOutput();
   sprintf(output, "%" PRIdFAST8, int_fast8_t(-17));
-  MOZ_ASSERT(!strcmp(output, "-17"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-17"));
 
   PoisonOutput();
   sprintf(output, "%" PRIiFAST8, int_fast8_t(42));
-  MOZ_ASSERT(!strcmp(output, "42"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "42"));
 }
 
 static void
 TestPrintSignedFast16()
 {
   PoisonOutput();
   sprintf(output, "%" PRIdFAST16, int_fast16_t(-289));
-  MOZ_ASSERT(!strcmp(output, "-289"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-289"));
 
   PoisonOutput();
   sprintf(output, "%" PRIiFAST16, int_fast16_t(728));
-  MOZ_ASSERT(!strcmp(output, "728"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "728"));
 }
 
 static void
 TestPrintSignedFast32()
 {
   PoisonOutput();
   sprintf(output, "%" PRIdFAST32, int_fast32_t(-342178));
-  MOZ_ASSERT(!strcmp(output, "-342178"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-342178"));
 
   PoisonOutput();
   sprintf(output, "%" PRIiFAST32, int_fast32_t(5719283));
-  MOZ_ASSERT(!strcmp(output, "5719283"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "5719283"));
 }
 
 static void
 TestPrintSignedFast64()
 {
   PoisonOutput();
   sprintf(output, "%" PRIdFAST64, int_fast64_t(-INT64_C(432157943248732)));
-  MOZ_ASSERT(!strcmp(output, "-432157943248732"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-432157943248732"));
 
   PoisonOutput();
   sprintf(output, "%" PRIiFAST64, int_fast64_t(INT64_C(325719232983)));
-  MOZ_ASSERT(!strcmp(output, "325719232983"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "325719232983"));
 }
 
 static void
 TestPrintSignedFastN()
 {
   TestPrintSignedFast8();
   TestPrintSignedFast16();
   TestPrintSignedFast32();
   TestPrintSignedFast64();
 }
 
 static void
 TestPrintSignedMax()
 {
   PoisonOutput();
   sprintf(output, "%" PRIdMAX, intmax_t(-INTMAX_C(432157943248732)));
-  MOZ_ASSERT(!strcmp(output, "-432157943248732"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "-432157943248732"));
 
   PoisonOutput();
   sprintf(output, "%" PRIiMAX, intmax_t(INTMAX_C(325719232983)));
-  MOZ_ASSERT(!strcmp(output, "325719232983"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "325719232983"));
 }
 
 static void
 TestPrintSignedPtr()
 {
   PoisonOutput();
   sprintf(output, "%" PRIdPTR, intptr_t(reinterpret_cast<void*>(12345678)));
-  MOZ_ASSERT(!strcmp(output, "12345678"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "12345678"));
 
   PoisonOutput();
   sprintf(output, "%" PRIiPTR, intptr_t(reinterpret_cast<void*>(87654321)));
-  MOZ_ASSERT(!strcmp(output, "87654321"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "87654321"));
 }
 
 static void
 TestPrintSigned()
 {
   TestPrintSignedN();
   TestPrintSignedLeastN();
   TestPrintSignedFastN();
@@ -244,316 +244,316 @@ TestPrintSigned()
  * In these names N is the width of the type as described in C99 7.18.1.
  */
 
 static void
 TestPrintUnsigned8()
 {
   PoisonOutput();
   sprintf(output, "%" PRIo8, uint8_t(042));
-  MOZ_ASSERT(!strcmp(output, "42"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "42"));
 
   PoisonOutput();
   sprintf(output, "%" PRIu8, uint8_t(17));
-  MOZ_ASSERT(!strcmp(output, "17"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "17"));
 
   PoisonOutput();
   sprintf(output, "%" PRIx8, uint8_t(0x2a));
-  MOZ_ASSERT(!strcmp(output, "2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIX8, uint8_t(0xCD));
-  MOZ_ASSERT(!strcmp(output, "CD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CD"));
 }
 
 static void
 TestPrintUnsigned16()
 {
   PoisonOutput();
   sprintf(output, "%" PRIo16, uint16_t(04242));
-  MOZ_ASSERT(!strcmp(output, "4242"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "4242"));
 
   PoisonOutput();
   sprintf(output, "%" PRIu16, uint16_t(1717));
-  MOZ_ASSERT(!strcmp(output, "1717"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "1717"));
 
   PoisonOutput();
   sprintf(output, "%" PRIx16, uint16_t(0x2a2a));
-  MOZ_ASSERT(!strcmp(output, "2a2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIX16, uint16_t(0xCDCD));
-  MOZ_ASSERT(!strcmp(output, "CDCD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CDCD"));
 }
 
 static void
 TestPrintUnsigned32()
 {
   PoisonOutput();
   sprintf(output, "%" PRIo32, uint32_t(0424242));
-  MOZ_ASSERT(!strcmp(output, "424242"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "424242"));
 
   PoisonOutput();
   sprintf(output, "%" PRIu32, uint32_t(171717));
-  MOZ_ASSERT(!strcmp(output, "171717"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "171717"));
 
   PoisonOutput();
   sprintf(output, "%" PRIx32, uint32_t(0x2a2a2a));
-  MOZ_ASSERT(!strcmp(output, "2a2a2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a2a2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIX32, uint32_t(0xCDCDCD));
-  MOZ_ASSERT(!strcmp(output, "CDCDCD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CDCDCD"));
 }
 
 static void
 TestPrintUnsigned64()
 {
   PoisonOutput();
   sprintf(output, "%" PRIo64, uint64_t(UINT64_C(0424242424242)));
-  MOZ_ASSERT(!strcmp(output, "424242424242"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "424242424242"));
 
   PoisonOutput();
   sprintf(output, "%" PRIu64, uint64_t(UINT64_C(17171717171717171717)));
-  MOZ_ASSERT(!strcmp(output, "17171717171717171717"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "17171717171717171717"));
 
   PoisonOutput();
   sprintf(output, "%" PRIx64, uint64_t(UINT64_C(0x2a2a2a2a2a2a2a)));
-  MOZ_ASSERT(!strcmp(output, "2a2a2a2a2a2a2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a2a2a2a2a2a2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIX64, uint64_t(UINT64_C(0xCDCDCDCDCDCD)));
-  MOZ_ASSERT(!strcmp(output, "CDCDCDCDCDCD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CDCDCDCDCDCD"));
 }
 
 static void
 TestPrintUnsignedN()
 {
   TestPrintUnsigned8();
   TestPrintUnsigned16();
   TestPrintUnsigned32();
   TestPrintUnsigned64();
 }
 
 static void
 TestPrintUnsignedLeast8()
 {
   PoisonOutput();
   sprintf(output, "%" PRIoLEAST8, uint_least8_t(042));
-  MOZ_ASSERT(!strcmp(output, "42"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "42"));
 
   PoisonOutput();
   sprintf(output, "%" PRIuLEAST8, uint_least8_t(17));
-  MOZ_ASSERT(!strcmp(output, "17"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "17"));
 
   PoisonOutput();
   sprintf(output, "%" PRIxLEAST8, uint_least8_t(0x2a));
-  MOZ_ASSERT(!strcmp(output, "2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIXLEAST8, uint_least8_t(0xCD));
-  MOZ_ASSERT(!strcmp(output, "CD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CD"));
 }
 
 static void
 TestPrintUnsignedLeast16()
 {
   PoisonOutput();
   sprintf(output, "%" PRIoLEAST16, uint_least16_t(04242));
-  MOZ_ASSERT(!strcmp(output, "4242"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "4242"));
 
   PoisonOutput();
   sprintf(output, "%" PRIuLEAST16, uint_least16_t(1717));
-  MOZ_ASSERT(!strcmp(output, "1717"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "1717"));
 
   PoisonOutput();
   sprintf(output, "%" PRIxLEAST16, uint_least16_t(0x2a2a));
-  MOZ_ASSERT(!strcmp(output, "2a2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIXLEAST16, uint_least16_t(0xCDCD));
-  MOZ_ASSERT(!strcmp(output, "CDCD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CDCD"));
 }
 
 static void
 TestPrintUnsignedLeast32()
 {
   PoisonOutput();
   sprintf(output, "%" PRIoLEAST32, uint_least32_t(0424242));
-  MOZ_ASSERT(!strcmp(output, "424242"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "424242"));
 
   PoisonOutput();
   sprintf(output, "%" PRIuLEAST32, uint_least32_t(171717));
-  MOZ_ASSERT(!strcmp(output, "171717"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "171717"));
 
   PoisonOutput();
   sprintf(output, "%" PRIxLEAST32, uint_least32_t(0x2a2a2a));
-  MOZ_ASSERT(!strcmp(output, "2a2a2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a2a2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIXLEAST32, uint_least32_t(0xCDCDCD));
-  MOZ_ASSERT(!strcmp(output, "CDCDCD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CDCDCD"));
 }
 
 static void
 TestPrintUnsignedLeast64()
 {
   PoisonOutput();
   sprintf(output, "%" PRIoLEAST64, uint_least64_t(UINT64_C(0424242424242)));
-  MOZ_ASSERT(!strcmp(output, "424242424242"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "424242424242"));
 
   PoisonOutput();
   sprintf(output, "%" PRIuLEAST64, uint_least64_t(UINT64_C(17171717171717171717)));
-  MOZ_ASSERT(!strcmp(output, "17171717171717171717"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "17171717171717171717"));
 
   PoisonOutput();
   sprintf(output, "%" PRIxLEAST64, uint_least64_t(UINT64_C(0x2a2a2a2a2a2a2a)));
-  MOZ_ASSERT(!strcmp(output, "2a2a2a2a2a2a2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a2a2a2a2a2a2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIXLEAST64, uint_least64_t(UINT64_C(0xCDCDCDCDCDCD)));
-  MOZ_ASSERT(!strcmp(output, "CDCDCDCDCDCD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CDCDCDCDCDCD"));
 }
 
 static void
 TestPrintUnsignedLeastN()
 {
   TestPrintUnsignedLeast8();
   TestPrintUnsignedLeast16();
   TestPrintUnsignedLeast32();
   TestPrintUnsignedLeast64();
 }
 
 static void
 TestPrintUnsignedFast8()
 {
   PoisonOutput();
   sprintf(output, "%" PRIoFAST8, uint_fast8_t(042));
-  MOZ_ASSERT(!strcmp(output, "42"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "42"));
 
   PoisonOutput();
   sprintf(output, "%" PRIuFAST8, uint_fast8_t(17));
-  MOZ_ASSERT(!strcmp(output, "17"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "17"));
 
   PoisonOutput();
   sprintf(output, "%" PRIxFAST8, uint_fast8_t(0x2a));
-  MOZ_ASSERT(!strcmp(output, "2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIXFAST8, uint_fast8_t(0xCD));
-  MOZ_ASSERT(!strcmp(output, "CD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CD"));
 }
 
 static void
 TestPrintUnsignedFast16()
 {
   PoisonOutput();
   sprintf(output, "%" PRIoFAST16, uint_fast16_t(04242));
-  MOZ_ASSERT(!strcmp(output, "4242"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "4242"));
 
   PoisonOutput();
   sprintf(output, "%" PRIuFAST16, uint_fast16_t(1717));
-  MOZ_ASSERT(!strcmp(output, "1717"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "1717"));
 
   PoisonOutput();
   sprintf(output, "%" PRIxFAST16, uint_fast16_t(0x2a2a));
-  MOZ_ASSERT(!strcmp(output, "2a2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIXFAST16, uint_fast16_t(0xCDCD));
-  MOZ_ASSERT(!strcmp(output, "CDCD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CDCD"));
 }
 
 static void
 TestPrintUnsignedFast32()
 {
   PoisonOutput();
   sprintf(output, "%" PRIoFAST32, uint_fast32_t(0424242));
-  MOZ_ASSERT(!strcmp(output, "424242"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "424242"));
 
   PoisonOutput();
   sprintf(output, "%" PRIuFAST32, uint_fast32_t(171717));
-  MOZ_ASSERT(!strcmp(output, "171717"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "171717"));
 
   PoisonOutput();
   sprintf(output, "%" PRIxFAST32, uint_fast32_t(0x2a2a2a));
-  MOZ_ASSERT(!strcmp(output, "2a2a2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a2a2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIXFAST32, uint_fast32_t(0xCDCDCD));
-  MOZ_ASSERT(!strcmp(output, "CDCDCD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CDCDCD"));
 }
 
 static void
 TestPrintUnsignedFast64()
 {
   PoisonOutput();
   sprintf(output, "%" PRIoFAST64, uint_fast64_t(UINT64_C(0424242424242)));
-  MOZ_ASSERT(!strcmp(output, "424242424242"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "424242424242"));
 
   PoisonOutput();
   sprintf(output, "%" PRIuFAST64, uint_fast64_t(UINT64_C(17171717171717171717)));
-  MOZ_ASSERT(!strcmp(output, "17171717171717171717"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "17171717171717171717"));
 
   PoisonOutput();
   sprintf(output, "%" PRIxFAST64, uint_fast64_t(UINT64_C(0x2a2a2a2a2a2a2a)));
-  MOZ_ASSERT(!strcmp(output, "2a2a2a2a2a2a2a"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "2a2a2a2a2a2a2a"));
 
   PoisonOutput();
   sprintf(output, "%" PRIXFAST64, uint_fast64_t(UINT64_C(0xCDCDCDCDCDCD)));
-  MOZ_ASSERT(!strcmp(output, "CDCDCDCDCDCD"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "CDCDCDCDCDCD"));
 }
 
 static void
 TestPrintUnsignedFastN()
 {
   TestPrintUnsignedFast8();
   TestPrintUnsignedFast16();
   TestPrintUnsignedFast32();
   TestPrintUnsignedFast64();
 }
 
 static void
 TestPrintUnsignedMax()
 {
   PoisonOutput();
   sprintf(output, "%" PRIoMAX, uintmax_t(UINTMAX_C(432157943248732)));
-  MOZ_ASSERT(!strcmp(output, "14220563454333534"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "14220563454333534"));
 
   PoisonOutput();
   sprintf(output, "%" PRIuMAX, uintmax_t(UINTMAX_C(325719232983)));
-  MOZ_ASSERT(!strcmp(output, "325719232983"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "325719232983"));
 
   PoisonOutput();
   sprintf(output, "%" PRIxMAX, uintmax_t(UINTMAX_C(327281321873)));
-  MOZ_ASSERT(!strcmp(output, "4c337ca791"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "4c337ca791"));
 
   PoisonOutput();
   sprintf(output, "%" PRIXMAX, uintmax_t(UINTMAX_C(912389523743523)));
-  MOZ_ASSERT(!strcmp(output, "33DD03D75A323"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "33DD03D75A323"));
 }
 
 static void
 TestPrintUnsignedPtr()
 {
   PoisonOutput();
   sprintf(output, "%" PRIoPTR, uintptr_t(reinterpret_cast<void*>(12345678)));
-  MOZ_ASSERT(!strcmp(output, "57060516"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "57060516"));
 
   PoisonOutput();
   sprintf(output, "%" PRIuPTR, uintptr_t(reinterpret_cast<void*>(87654321)));
-  MOZ_ASSERT(!strcmp(output, "87654321"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "87654321"));
 
   PoisonOutput();
   sprintf(output, "%" PRIxPTR, uintptr_t(reinterpret_cast<void*>(0x4c3a791)));
-  MOZ_ASSERT(!strcmp(output, "4c3a791"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "4c3a791"));
 
   PoisonOutput();
   sprintf(output, "%" PRIXPTR, uintptr_t(reinterpret_cast<void*>(0xF328DB)));
-  MOZ_ASSERT(!strcmp(output, "F328DB"));
+  MOZ_RELEASE_ASSERT(!strcmp(output, "F328DB"));
 }
 
 static void
 TestPrintUnsigned()
 {
   TestPrintUnsignedN();
   TestPrintUnsignedLeastN();
   TestPrintUnsignedFastN();
@@ -633,72 +633,72 @@ ExtraBitsUntouched(const Input<T>& input
 static void
 TestScanSigned8()
 {
 #if SHOULD_TEST_8BIT_FORMAT_MACROS
   Input<int8_t> u;
 
   PoisonInput(u);
   sscanf("-17", "%" SCNd8, &u.i);
-  MOZ_ASSERT(u.i == -17);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -17);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("042", "%" SCNi8, &u.i);
-  MOZ_ASSERT(u.i == 042);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 042);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 #endif
 }
 
 static void
 TestScanSigned16()
 {
   Input<int16_t> u;
 
   PoisonInput(u);
   sscanf("-1742", "%" SCNd16, &u.i);
-  MOZ_ASSERT(u.i == -1742);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -1742);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("04217", "%" SCNi16, &u.i);
-  MOZ_ASSERT(u.i == 04217);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 04217);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanSigned32()
 {
   Input<int32_t> u;
 
   PoisonInput(u);
   sscanf("-174257", "%" SCNd32, &u.i);
-  MOZ_ASSERT(u.i == -174257);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -174257);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("0423571", "%" SCNi32, &u.i);
-  MOZ_ASSERT(u.i == 0423571);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0423571);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanSigned64()
 {
   Input<int64_t> u;
 
   PoisonInput(u);
   sscanf("-17425238927232", "%" SCNd64, &u.i);
-  MOZ_ASSERT(u.i == -INT64_C(17425238927232));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -INT64_C(17425238927232));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("042333576571", "%" SCNi64, &u.i);
-  MOZ_ASSERT(u.i == INT64_C(042333576571));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == INT64_C(042333576571));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanSignedN()
 {
   TestScanSigned8();
   TestScanSigned16();
   TestScanSigned32();
@@ -708,72 +708,72 @@ TestScanSignedN()
 static void
 TestScanSignedLeast8()
 {
 #if SHOULD_TEST_8BIT_FORMAT_MACROS
   Input<int_least8_t> u;
 
   PoisonInput(u);
   sscanf("-17", "%" SCNdLEAST8, &u.i);
-  MOZ_ASSERT(u.i == -17);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -17);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("042", "%" SCNiLEAST8, &u.i);
-  MOZ_ASSERT(u.i == 042);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 042);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 #endif
 }
 
 static void
 TestScanSignedLeast16()
 {
   Input<int_least16_t> u;
 
   PoisonInput(u);
   sscanf("-1742", "%" SCNdLEAST16, &u.i);
-  MOZ_ASSERT(u.i == -1742);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -1742);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("04217", "%" SCNiLEAST16, &u.i);
-  MOZ_ASSERT(u.i == 04217);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 04217);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanSignedLeast32()
 {
   Input<int_least32_t> u;
 
   PoisonInput(u);
   sscanf("-174257", "%" SCNdLEAST32, &u.i);
-  MOZ_ASSERT(u.i == -174257);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -174257);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("0423571", "%" SCNiLEAST32, &u.i);
-  MOZ_ASSERT(u.i == 0423571);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0423571);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanSignedLeast64()
 {
   Input<int_least64_t> u;
 
   PoisonInput(u);
   sscanf("-17425238927232", "%" SCNdLEAST64, &u.i);
-  MOZ_ASSERT(u.i == -INT64_C(17425238927232));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -INT64_C(17425238927232));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("042333576571", "%" SCNiLEAST64, &u.i);
-  MOZ_ASSERT(u.i == INT64_C(042333576571));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == INT64_C(042333576571));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanSignedLeastN()
 {
   TestScanSignedLeast8();
   TestScanSignedLeast16();
   TestScanSignedLeast32();
@@ -783,72 +783,72 @@ TestScanSignedLeastN()
 static void
 TestScanSignedFast8()
 {
 #if SHOULD_TEST_8BIT_FORMAT_MACROS
   Input<int_fast8_t> u;
 
   PoisonInput(u);
   sscanf("-17", "%" SCNdFAST8, &u.i);
-  MOZ_ASSERT(u.i == -17);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -17);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("042", "%" SCNiFAST8, &u.i);
-  MOZ_ASSERT(u.i == 042);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 042);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 #endif
 }
 
 static void
 TestScanSignedFast16()
 {
   Input<int_fast16_t> u;
 
   PoisonInput(u);
   sscanf("-1742", "%" SCNdFAST16, &u.i);
-  MOZ_ASSERT(u.i == -1742);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -1742);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("04217", "%" SCNiFAST16, &u.i);
-  MOZ_ASSERT(u.i == 04217);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 04217);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanSignedFast32()
 {
   Input<int_fast32_t> u;
 
   PoisonInput(u);
   sscanf("-174257", "%" SCNdFAST32, &u.i);
-  MOZ_ASSERT(u.i == -174257);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -174257);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("0423571", "%" SCNiFAST32, &u.i);
-  MOZ_ASSERT(u.i == 0423571);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0423571);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanSignedFast64()
 {
   Input<int_fast64_t> u;
 
   PoisonInput(u);
   sscanf("-17425238927232", "%" SCNdFAST64, &u.i);
-  MOZ_ASSERT(u.i == -INT64_C(17425238927232));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -INT64_C(17425238927232));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("042333576571", "%" SCNiFAST64, &u.i);
-  MOZ_ASSERT(u.i == INT64_C(042333576571));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == INT64_C(042333576571));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanSignedFastN()
 {
   TestScanSignedFast8();
   TestScanSignedFast16();
   TestScanSignedFast32();
@@ -857,39 +857,39 @@ TestScanSignedFastN()
 
 static void
 TestScanSignedMax()
 {
   Input<intmax_t> u;
 
   PoisonInput(u);
   sscanf("-432157943248732", "%" SCNdMAX, &u.i);
-  MOZ_ASSERT(u.i == -INTMAX_C(432157943248732));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == -INTMAX_C(432157943248732));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("04233357236571", "%" SCNiMAX, &u.i);
-  MOZ_ASSERT(u.i == INTMAX_C(04233357236571));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == INTMAX_C(04233357236571));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanSignedPtr()
 {
   Input<intptr_t> u;
 
   PoisonInput(u);
   sscanf("12345678", "%" SCNdPTR, &u.i);
-  MOZ_ASSERT(u.i == intptr_t(reinterpret_cast<void*>(12345678)));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == intptr_t(reinterpret_cast<void*>(12345678)));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("04233357236", "%" SCNiPTR, &u.i);
-  MOZ_ASSERT(u.i == intptr_t(reinterpret_cast<void*>(04233357236)));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == intptr_t(reinterpret_cast<void*>(04233357236)));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanSigned()
 {
   TestScanSignedN();
   TestScanSignedLeastN();
   TestScanSignedFastN();
@@ -910,92 +910,92 @@ TestScanSigned()
 static void
 TestScanUnsigned8()
 {
 #if SHOULD_TEST_8BIT_FORMAT_MACROS
   Input<uint8_t> u;
 
   PoisonInput(u);
   sscanf("17", "%" SCNo8, &u.i);
-  MOZ_ASSERT(u.i == 017);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 017);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("42", "%" SCNu8, &u.i);
-  MOZ_ASSERT(u.i == 42);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 42);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("2A", "%" SCNx8, &u.i);
-  MOZ_ASSERT(u.i == 0x2A);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0x2A);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 #endif
 }
 
 static void
 TestScanUnsigned16()
 {
   Input<uint16_t> u;
 
   PoisonInput(u);
   sscanf("1742", "%" SCNo16, &u.i);
-  MOZ_ASSERT(u.i == 01742);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 01742);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("4217", "%" SCNu16, &u.i);
-  MOZ_ASSERT(u.i == 4217);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 4217);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("2ABC", "%" SCNx16, &u.i);
-  MOZ_ASSERT(u.i == 0x2ABC);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0x2ABC);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanUnsigned32()
 {
   Input<uint32_t> u;
 
   PoisonInput(u);
   sscanf("17421742", "%" SCNo32, &u.i);
-  MOZ_ASSERT(u.i == 017421742);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 017421742);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("4217867", "%" SCNu32, &u.i);
-  MOZ_ASSERT(u.i == 4217867);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 4217867);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("2ABCBEEF", "%" SCNx32, &u.i);
-  MOZ_ASSERT(u.i == 0x2ABCBEEF);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0x2ABCBEEF);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanUnsigned64()
 {
   Input<uint64_t> u;
 
   PoisonInput(u);
   sscanf("17421742173", "%" SCNo64, &u.i);
-  MOZ_ASSERT(u.i == UINT64_C(017421742173));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINT64_C(017421742173));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("421786713579", "%" SCNu64, &u.i);
-  MOZ_ASSERT(u.i == UINT64_C(421786713579));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINT64_C(421786713579));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("DEADBEEF7457E", "%" SCNx64, &u.i);
-  MOZ_ASSERT(u.i == UINT64_C(0xDEADBEEF7457E));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINT64_C(0xDEADBEEF7457E));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanUnsignedN()
 {
   TestScanUnsigned8();
   TestScanUnsigned16();
   TestScanUnsigned32();
@@ -1005,92 +1005,92 @@ TestScanUnsignedN()
 static void
 TestScanUnsignedLeast8()
 {
 #if SHOULD_TEST_8BIT_FORMAT_MACROS
   Input<uint_least8_t> u;
 
   PoisonInput(u);
   sscanf("17", "%" SCNoLEAST8, &u.i);
-  MOZ_ASSERT(u.i == 017);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 017);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("42", "%" SCNuLEAST8, &u.i);
-  MOZ_ASSERT(u.i == 42);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 42);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("2A", "%" SCNxLEAST8, &u.i);
-  MOZ_ASSERT(u.i == 0x2A);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0x2A);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 #endif
 }
 
 static void
 TestScanUnsignedLeast16()
 {
   Input<uint_least16_t> u;
 
   PoisonInput(u);
   sscanf("1742", "%" SCNoLEAST16, &u.i);
-  MOZ_ASSERT(u.i == 01742);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 01742);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("4217", "%" SCNuLEAST16, &u.i);
-  MOZ_ASSERT(u.i == 4217);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 4217);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("2ABC", "%" SCNxLEAST16, &u.i);
-  MOZ_ASSERT(u.i == 0x2ABC);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0x2ABC);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanUnsignedLeast32()
 {
   Input<uint_least32_t> u;
 
   PoisonInput(u);
   sscanf("17421742", "%" SCNoLEAST32, &u.i);
-  MOZ_ASSERT(u.i == 017421742);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 017421742);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("4217867", "%" SCNuLEAST32, &u.i);
-  MOZ_ASSERT(u.i == 4217867);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 4217867);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("2ABCBEEF", "%" SCNxLEAST32, &u.i);
-  MOZ_ASSERT(u.i == 0x2ABCBEEF);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0x2ABCBEEF);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanUnsignedLeast64()
 {
   Input<uint_least64_t> u;
 
   PoisonInput(u);
   sscanf("17421742173", "%" SCNoLEAST64, &u.i);
-  MOZ_ASSERT(u.i == UINT64_C(017421742173));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINT64_C(017421742173));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("421786713579", "%" SCNuLEAST64, &u.i);
-  MOZ_ASSERT(u.i == UINT64_C(421786713579));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINT64_C(421786713579));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("DEADBEEF7457E", "%" SCNxLEAST64, &u.i);
-  MOZ_ASSERT(u.i == UINT64_C(0xDEADBEEF7457E));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINT64_C(0xDEADBEEF7457E));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanUnsignedLeastN()
 {
   TestScanUnsignedLeast8();
   TestScanUnsignedLeast16();
   TestScanUnsignedLeast32();
@@ -1100,92 +1100,92 @@ TestScanUnsignedLeastN()
 static void
 TestScanUnsignedFast8()
 {
 #if SHOULD_TEST_8BIT_FORMAT_MACROS
   Input<uint_fast8_t> u;
 
   PoisonInput(u);
   sscanf("17", "%" SCNoFAST8, &u.i);
-  MOZ_ASSERT(u.i == 017);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 017);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("42", "%" SCNuFAST8, &u.i);
-  MOZ_ASSERT(u.i == 42);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 42);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("2A", "%" SCNxFAST8, &u.i);
-  MOZ_ASSERT(u.i == 0x2A);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0x2A);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 #endif
 }
 
 static void
 TestScanUnsignedFast16()
 {
   Input<uint_fast16_t> u;
 
   PoisonInput(u);
   sscanf("1742", "%" SCNoFAST16, &u.i);
-  MOZ_ASSERT(u.i == 01742);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 01742);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("4217", "%" SCNuFAST16, &u.i);
-  MOZ_ASSERT(u.i == 4217);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 4217);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("2ABC", "%" SCNxFAST16, &u.i);
-  MOZ_ASSERT(u.i == 0x2ABC);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0x2ABC);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanUnsignedFast32()
 {
   Input<uint_fast32_t> u;
 
   PoisonInput(u);
   sscanf("17421742", "%" SCNoFAST32, &u.i);
-  MOZ_ASSERT(u.i == 017421742);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 017421742);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("4217867", "%" SCNuFAST32, &u.i);
-  MOZ_ASSERT(u.i == 4217867);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 4217867);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("2ABCBEEF", "%" SCNxFAST32, &u.i);
-  MOZ_ASSERT(u.i == 0x2ABCBEEF);
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == 0x2ABCBEEF);
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanUnsignedFast64()
 {
   Input<uint_fast64_t> u;
 
   PoisonInput(u);
   sscanf("17421742173", "%" SCNoFAST64, &u.i);
-  MOZ_ASSERT(u.i == UINT64_C(017421742173));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINT64_C(017421742173));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("421786713579", "%" SCNuFAST64, &u.i);
-  MOZ_ASSERT(u.i == UINT64_C(421786713579));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINT64_C(421786713579));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("DEADBEEF7457E", "%" SCNxFAST64, &u.i);
-  MOZ_ASSERT(u.i == UINT64_C(0xDEADBEEF7457E));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINT64_C(0xDEADBEEF7457E));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanUnsignedFastN()
 {
   TestScanUnsignedFast8();
   TestScanUnsignedFast16();
   TestScanUnsignedFast32();
@@ -1194,49 +1194,49 @@ TestScanUnsignedFastN()
 
 static void
 TestScanUnsignedMax()
 {
   Input<uintmax_t> u;
 
   PoisonInput(u);
   sscanf("14220563454333534", "%" SCNoMAX, &u.i);
-  MOZ_ASSERT(u.i == UINTMAX_C(432157943248732));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINTMAX_C(432157943248732));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("432157943248732", "%" SCNuMAX, &u.i);
-  MOZ_ASSERT(u.i == UINTMAX_C(432157943248732));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINTMAX_C(432157943248732));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("4c337ca791", "%" SCNxMAX, &u.i);
-  MOZ_ASSERT(u.i == UINTMAX_C(327281321873));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == UINTMAX_C(327281321873));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanUnsignedPtr()
 {
   Input<uintptr_t> u;
 
   PoisonInput(u);
   sscanf("57060516", "%" SCNoPTR, &u.i);
-  MOZ_ASSERT(u.i == uintptr_t(reinterpret_cast<void*>(12345678)));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == uintptr_t(reinterpret_cast<void*>(12345678)));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("87654321", "%" SCNuPTR, &u.i);
-  MOZ_ASSERT(u.i == uintptr_t(reinterpret_cast<void*>(87654321)));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == uintptr_t(reinterpret_cast<void*>(87654321)));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 
   PoisonInput(u);
   sscanf("4c3a791", "%" SCNxPTR, &u.i);
-  MOZ_ASSERT(u.i == uintptr_t(reinterpret_cast<void*>(0x4c3a791)));
-  MOZ_ASSERT(ExtraBitsUntouched(u));
+  MOZ_RELEASE_ASSERT(u.i == uintptr_t(reinterpret_cast<void*>(0x4c3a791)));
+  MOZ_RELEASE_ASSERT(ExtraBitsUntouched(u));
 }
 
 static void
 TestScanUnsigned()
 {
   TestScanUnsignedN();
   TestScanUnsignedLeastN();
   TestScanUnsignedFastN();
--- a/mfbt/tests/TestRollingMean.cpp
+++ b/mfbt/tests/TestRollingMean.cpp
@@ -45,75 +45,75 @@ class RollingMeanSuite
       testRolling();
       testClass();
       testMove();
     }
 
   private:
     void testZero() {
       RollingMean<uint32_t, uint64_t> mean(3);
-      MOZ_ASSERT(mean.empty());
+      MOZ_RELEASE_ASSERT(mean.empty());
     }
 
     void testClear() {
       RollingMean<uint32_t, uint64_t> mean(3);
 
       mean.insert(4);
-      MOZ_ASSERT(mean.mean() == 4);
+      MOZ_RELEASE_ASSERT(mean.mean() == 4);
 
       mean.clear();
-      MOZ_ASSERT(mean.empty());
+      MOZ_RELEASE_ASSERT(mean.empty());
 
       mean.insert(3);
-      MOZ_ASSERT(mean.mean() == 3);
+      MOZ_RELEASE_ASSERT(mean.mean() == 3);
     }
 
     void testRolling() {
       RollingMean<uint32_t, uint64_t> mean(3);
 
       mean.insert(10);
-      MOZ_ASSERT(mean.mean() == 10);
+      MOZ_RELEASE_ASSERT(mean.mean() == 10);
 
       mean.insert(20);
-      MOZ_ASSERT(mean.mean() == 15);
+      MOZ_RELEASE_ASSERT(mean.mean() == 15);
 
       mean.insert(35);
-      MOZ_ASSERT(mean.mean() == 21);
+      MOZ_RELEASE_ASSERT(mean.mean() == 21);
 
       mean.insert(5);
-      MOZ_ASSERT(mean.mean() == 20);
+      MOZ_RELEASE_ASSERT(mean.mean() == 20);
 
       mean.insert(10);
-      MOZ_ASSERT(mean.mean() == 16);
+      MOZ_RELEASE_ASSERT(mean.mean() == 16);
     }
 
     void testClass() {
       RollingMean<MyClass, MyClass> mean(3);
 
       mean.insert(MyClass(4));
-      MOZ_ASSERT(mean.mean() == MyClass(4));
+      MOZ_RELEASE_ASSERT(mean.mean() == MyClass(4));
 
       mean.clear();
-      MOZ_ASSERT(mean.empty());
+      MOZ_RELEASE_ASSERT(mean.empty());
     }
 
     void testMove() {
       RollingMean<uint32_t, uint64_t> mean(3);
       mean = RollingMean<uint32_t, uint64_t>(4);
-      MOZ_ASSERT(mean.maxValues() == 4);
+      MOZ_RELEASE_ASSERT(mean.maxValues() == 4);
 
       mean.insert(10);
-      MOZ_ASSERT(mean.mean() == 10);
+      MOZ_RELEASE_ASSERT(mean.mean() == 10);
 
       mean = RollingMean<uint32_t, uint64_t>(3);
       mean.insert(30);
       mean.insert(40);
       mean.insert(50);
       mean.insert(60);
-      MOZ_ASSERT(mean.mean() == 50);
+      MOZ_RELEASE_ASSERT(mean.mean() == 50);
     }
 
 };
 
 int main()
 {
   RollingMeanSuite suite;
   suite.runTests();
--- a/mfbt/tests/TestSHA1.cpp
+++ b/mfbt/tests/TestSHA1.cpp
@@ -193,12 +193,12 @@ main()
     { 0xc8, 0xf2, 0x09, 0x59, 0x4e, 0x64, 0x40, 0xaa, 0x7b, 0xf7, 0xb8, 0xe0,
       0xfa, 0x44, 0xb2, 0x31, 0x95, 0xad, 0x94, 0x81 };
 
   static_assert(sizeof(expected) == sizeof(SHA1Sum::Hash),
                 "expected-data size should be the same as the actual hash "
                 "size");
 
   for (size_t i = 0; i < SHA1Sum::HashSize; i++)
-    MOZ_ASSERT(hash[i] == expected[i]);
+    MOZ_RELEASE_ASSERT(hash[i] == expected[i]);
 
   return 0;
 }
--- a/mfbt/tests/TestTypeTraits.cpp
+++ b/mfbt/tests/TestTypeTraits.cpp
@@ -157,92 +157,92 @@ namespace CPlusPlus11IsBaseOf {
 struct B {};
 struct B1 : B {};
 struct B2 : B {};
 struct D : private B1, private B2 {};
 
 static void
 StandardIsBaseOfTests()
 {
-  MOZ_ASSERT((IsBaseOf<B, D>::value) == true);
-  MOZ_ASSERT((IsBaseOf<const B, D>::value) == true);
-  MOZ_ASSERT((IsBaseOf<B, const D>::value) == true);
-  MOZ_ASSERT((IsBaseOf<B, const B>::value) == true);
-  MOZ_ASSERT((IsBaseOf<D, B>::value) == false);
-  MOZ_ASSERT((IsBaseOf<B&, D&>::value) == false);
-  MOZ_ASSERT((IsBaseOf<B[3], D[3]>::value) == false);
+  static_assert((IsBaseOf<B, D>::value) == true, "IsBaseOf fails on diamond");
+  static_assert((IsBaseOf<const B, D>::value) == true, "IsBaseOf fails on diamond plus constness change");
+  static_assert((IsBaseOf<B, const D>::value) == true, "IsBaseOf fails on diamond plus constness change");
+  static_assert((IsBaseOf<B, const B>::value) == true, "IsBaseOf fails on constness change");
+  static_assert((IsBaseOf<D, B>::value) == false, "IsBaseOf got the direction of inheritance wrong");
+  static_assert((IsBaseOf<B&, D&>::value) == false, "IsBaseOf should return false on references");
+  static_assert((IsBaseOf<B[3], D[3]>::value) == false, "IsBaseOf should return false on arrays");
   // We fail at the following test.  To fix it, we need to specialize IsBaseOf
   // for all built-in types.
-  // MOZ_ASSERT((IsBaseOf<int, int>::value) == false);
+  // static_assert((IsBaseOf<int, int>::value) == false);
 }
 
 } /* namespace CPlusPlus11IsBaseOf */
 
 class A { };
 class B : public A { };
 class C : private A { };
 class D { };
 class E : public A { };
 class F : public B, public E { };
 
 static void
 TestIsBaseOf()
 {
-  MOZ_ASSERT((IsBaseOf<A, B>::value),
+  static_assert((IsBaseOf<A, B>::value),
              "A is a base of B");
-  MOZ_ASSERT((!IsBaseOf<B, A>::value),
+  static_assert((!IsBaseOf<B, A>::value),
              "B is not a base of A");
-  MOZ_ASSERT((IsBaseOf<A, C>::value),
+  static_assert((IsBaseOf<A, C>::value),
              "A is a base of C");
-  MOZ_ASSERT((!IsBaseOf<C, A>::value),
+  static_assert((!IsBaseOf<C, A>::value),
              "C is not a base of A");
-  MOZ_ASSERT((IsBaseOf<A, F>::value),
+  static_assert((IsBaseOf<A, F>::value),
              "A is a base of F");
-  MOZ_ASSERT((!IsBaseOf<F, A>::value),
+  static_assert((!IsBaseOf<F, A>::value),
              "F is not a base of A");
-  MOZ_ASSERT((!IsBaseOf<A, D>::value),
+  static_assert((!IsBaseOf<A, D>::value),
              "A is not a base of D");
-  MOZ_ASSERT((!IsBaseOf<D, A>::value),
+  static_assert((!IsBaseOf<D, A>::value),
              "D is not a base of A");
-  MOZ_ASSERT((IsBaseOf<B, B>::value),
+  static_assert((IsBaseOf<B, B>::value),
              "B is the same as B (and therefore, a base of B)");
 }
 
 static void
 TestIsConvertible()
 {
   // Pointer type convertibility
-  MOZ_ASSERT((IsConvertible<A*, A*>::value),
+  static_assert((IsConvertible<A*, A*>::value),
              "A* should convert to A*");
-  MOZ_ASSERT((IsConvertible<B*, A*>::value),
+  static_assert((IsConvertible<B*, A*>::value),
              "B* should convert to A*");
-  MOZ_ASSERT((!IsConvertible<A*, B*>::value),
+  static_assert((!IsConvertible<A*, B*>::value),
              "A* shouldn't convert to B*");
-  MOZ_ASSERT((!IsConvertible<A*, C*>::value),
+  static_assert((!IsConvertible<A*, C*>::value),
              "A* shouldn't convert to C*");
-  MOZ_ASSERT((!IsConvertible<A*, D*>::value),
+  static_assert((!IsConvertible<A*, D*>::value),
              "A* shouldn't convert to unrelated D*");
-  MOZ_ASSERT((!IsConvertible<D*, A*>::value),
+  static_assert((!IsConvertible<D*, A*>::value),
              "D* shouldn't convert to unrelated A*");
 
   // Instance type convertibility
-  MOZ_ASSERT((IsConvertible<A, A>::value),
+  static_assert((IsConvertible<A, A>::value),
              "A is A");
-  MOZ_ASSERT((IsConvertible<B, A>::value),
+  static_assert((IsConvertible<B, A>::value),
              "B converts to A");
-  MOZ_ASSERT((!IsConvertible<D, A>::value),
+  static_assert((!IsConvertible<D, A>::value),
              "D and A are unrelated");
-  MOZ_ASSERT((!IsConvertible<A, D>::value),
+  static_assert((!IsConvertible<A, D>::value),
              "A and D are unrelated");
 
   // These cases seem to require C++11 support to properly implement them, so
   // for now just disable them.
-  //MOZ_ASSERT((!IsConvertible<C*, A*>::value),
+  //static_assert((!IsConvertible<C*, A*>::value),
   //           "C* shouldn't convert to A* (private inheritance)");
-  //MOZ_ASSERT((!IsConvertible<C, A>::value),
+  //static_assert((!IsConvertible<C, A>::value),
   //           "C doesn't convert to A (private inheritance)");
 }
 
 static_assert(IsSame<MakeSigned<const unsigned char>::Type, const signed char>::value,
               "const unsigned char won't signify correctly");
 static_assert(IsSame<MakeSigned<volatile unsigned short>::Type, volatile signed short>::value,
               "volatile unsigned short won't signify correctly");
 static_assert(IsSame<MakeSigned<const volatile unsigned int>::Type, const volatile signed int>::value,
--- a/mfbt/tests/TestWeakPtr.cpp
+++ b/mfbt/tests/TestWeakPtr.cpp
@@ -33,18 +33,18 @@ Example()
   if (weak) {
     weak->num = 17;
     weak->act();
   }
 
   // Destroying the underlying object clears weak pointers to it.
   delete ptr;
 
-  MOZ_ASSERT(!weak, "Deleting |ptr| clears weak pointers to it.");
-  MOZ_ASSERT(!other, "Deleting |ptr| clears all weak pointers to it.");
+  MOZ_RELEASE_ASSERT(!weak, "Deleting |ptr| clears weak pointers to it.");
+  MOZ_RELEASE_ASSERT(!other, "Deleting |ptr| clears all weak pointers to it.");
 }
 
 struct A : public SupportsWeakPtr<A>
 {
     MOZ_DECLARE_REFCOUNTED_TYPENAME(A)
     int data;
 };
 
@@ -58,22 +58,22 @@ main()
   // a2 is unused to test the case when we haven't initialized
   // the internal WeakReference pointer.
   A* a2 = new A;
 
   a->data = 5;
   WeakPtr<A> ptr = a->asWeakPtr();
   {
       WeakPtr<A> ptr2 = a->asWeakPtr();
-      MOZ_ASSERT(ptr->data == 5);
+      MOZ_RELEASE_ASSERT(ptr->data == 5);
       WeakPtr<A> ptr3 = a->asWeakPtr();
-      MOZ_ASSERT(ptr->data == 5);
+      MOZ_RELEASE_ASSERT(ptr->data == 5);
   }
 
   delete a;
-  MOZ_ASSERT(!ptr);
+  MOZ_RELEASE_ASSERT(!ptr);
 
   delete a2;
 
   Example();
 
   return 0;
 }