Bug 1305596 - Convert debug-only asserts added in bug 1303247 to release asserts. r=rillian
authorMatthew Gregan <kinetik@flim.org>
Tue, 27 Sep 2016 13:09:21 +1300
changeset 315491 9429b90c5754982ad3564da4c1b7a11f772e2566
parent 315490 31c6da3081bffa6aed799d100566dcd09e1cfac0
child 315492 b7366ba1500d0fa6a63c9c8613a07ec34f72cf0e
push id30750
push usercbook@mozilla.com
push dateWed, 28 Sep 2016 13:57:20 +0000
treeherdermozilla-central@b1d60f2f68c7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs1305596, 1303247
milestone52.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 1305596 - Convert debug-only asserts added in bug 1303247 to release asserts. r=rillian
media/libstagefright/binding/MP4Metadata.cpp
--- a/media/libstagefright/binding/MP4Metadata.cpp
+++ b/media/libstagefright/binding/MP4Metadata.cpp
@@ -277,40 +277,41 @@ MP4Metadata::GetTrackInfo(mozilla::Track
     return info;
   }
 
   mozilla::UniquePtr<mozilla::TrackInfo> infoRust =
       mRust->GetTrackInfo(aType, aTrackNumber);
 
 #ifndef RELEASE_BUILD
   if (mRustTestMode && info) {
-    MOZ_ASSERT(infoRust);
-    MOZ_ASSERT(infoRust->mId == info->mId);
-    MOZ_ASSERT(infoRust->mKind == info->mKind);
-    MOZ_ASSERT(infoRust->mLabel == info->mLabel);
-    MOZ_ASSERT(infoRust->mLanguage == info->mLanguage);
-    MOZ_ASSERT(infoRust->mEnabled == info->mEnabled);
-    MOZ_ASSERT(infoRust->mTrackId == info->mTrackId);
-    MOZ_ASSERT(infoRust->mMimeType == info->mMimeType);
-    MOZ_ASSERT(infoRust->mDuration == info->mDuration);
-    MOZ_ASSERT(infoRust->mMediaTime == info->mMediaTime);
+    MOZ_DIAGNOSTIC_ASSERT(infoRust);
+    MOZ_DIAGNOSTIC_ASSERT(infoRust->mId == info->mId);
+    MOZ_DIAGNOSTIC_ASSERT(infoRust->mKind == info->mKind);
+    MOZ_DIAGNOSTIC_ASSERT(infoRust->mLabel == info->mLabel);
+    MOZ_DIAGNOSTIC_ASSERT(infoRust->mLanguage == info->mLanguage);
+    MOZ_DIAGNOSTIC_ASSERT(infoRust->mEnabled == info->mEnabled);
+    MOZ_DIAGNOSTIC_ASSERT(infoRust->mTrackId == info->mTrackId);
+    MOZ_DIAGNOSTIC_ASSERT(infoRust->mMimeType == info->mMimeType);
+    MOZ_DIAGNOSTIC_ASSERT(infoRust->mDuration == info->mDuration);
+    MOZ_DIAGNOSTIC_ASSERT(infoRust->mMediaTime == info->mMediaTime);
     switch (aType) {
     case mozilla::TrackInfo::kAudioTrack: {
       AudioInfo *audioRust = infoRust->GetAsAudioInfo(), *audio = info->GetAsAudioInfo();
-      MOZ_ASSERT(audioRust->mRate == audio->mRate);
-      MOZ_ASSERT(audioRust->mChannels == audio->mChannels);
-      MOZ_ASSERT(audioRust->mBitDepth == audio->mBitDepth);
-      //MOZ_ASSERT(audioRust->mProfile == audio->mProfile);
-      //MOZ_ASSERT(audioRust->mExtendedProfile == audio->mExtendedProfile);
+      MOZ_DIAGNOSTIC_ASSERT(audioRust->mRate == audio->mRate);
+      MOZ_DIAGNOSTIC_ASSERT(audioRust->mChannels == audio->mChannels);
+      MOZ_DIAGNOSTIC_ASSERT(audioRust->mBitDepth == audio->mBitDepth);
+      // TODO: These fields aren't implemented in the Rust demuxer yet.
+      //MOZ_DIAGNOSTIC_ASSERT(audioRust->mProfile != audio->mProfile);
+      //MOZ_DIAGNOSTIC_ASSERT(audioRust->mExtendedProfile != audio->mExtendedProfile);
       break;
     }
     case mozilla::TrackInfo::kVideoTrack: {
       VideoInfo *videoRust = infoRust->GetAsVideoInfo(), *video = info->GetAsVideoInfo();
-      MOZ_ASSERT(videoRust->mDisplay == video->mDisplay);
-      MOZ_ASSERT(videoRust->mImage == video->mImage);
+      MOZ_DIAGNOSTIC_ASSERT(videoRust->mDisplay == video->mDisplay);
+      MOZ_DIAGNOSTIC_ASSERT(videoRust->mImage == video->mImage);
       break;
     }
     default:
       break;
     }
   }
 #endif