Bug 1530322 - P1. Make Interval assertion diagnostic_assert. r!gerald r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Tue, 26 Feb 2019 09:09:34 +0000
changeset 518926 3f3ba8c155c62cfb06f4aef1c392e01d2c8b1d56
parent 518925 9b617c97285a7757e86ae94b5e974be93074a4f0
child 518927 8ba89b2f60ff62709b44699b9909c00f3f32a5c0
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1530322
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1530322 - P1. Make Interval assertion diagnostic_assert. r!gerald r=gerald Differential Revision: https://phabricator.services.mozilla.com/D21171
dom/media/Intervals.h
--- a/dom/media/Intervals.h
+++ b/dom/media/Intervals.h
@@ -40,25 +40,25 @@ class Interval {
 
   Interval() : mStart(T()), mEnd(T()), mFuzz(T()) {}
 
   template <typename StartArg, typename EndArg>
   Interval(StartArg&& aStart, EndArg&& aEnd)
       : mStart(std::forward<StartArg>(aStart)),
         mEnd(std::forward<EndArg>(aEnd)),
         mFuzz() {
-    MOZ_ASSERT(aStart <= aEnd);
+    MOZ_DIAGNOSTIC_ASSERT(mStart <= mEnd, "Invalid Interval");
   }
 
   template <typename StartArg, typename EndArg, typename FuzzArg>
   Interval(StartArg&& aStart, EndArg&& aEnd, FuzzArg&& aFuzz)
       : mStart(std::forward<StartArg>(aStart)),
         mEnd(std::forward<EndArg>(aEnd)),
         mFuzz(std::forward<FuzzArg>(aFuzz)) {
-    MOZ_ASSERT(aStart <= aEnd);
+    MOZ_DIAGNOSTIC_ASSERT(mStart <= mEnd, "Invalid Interval");
   }
 
   Interval(const SelfType& aOther)
       : mStart(aOther.mStart), mEnd(aOther.mEnd), mFuzz(aOther.mFuzz) {}
 
   Interval(SelfType&& aOther)
       : mStart(std::move(aOther.mStart)),
         mEnd(std::move(aOther.mEnd)),