Bug 1129247 - Use MOZ_DIAGNOSTIC_ASSERT instead of MOZ_RELEASE_ASSERT in media code. r=mattwoodrow

This commit is contained in:
Bobby Holley 2015-02-04 13:13:59 -08:00
Родитель ebc54d52b9
Коммит 8f668dcd13
2 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -94,7 +94,7 @@ public:
void Disconnect()
{
AssertOnDispatchThread();
MOZ_RELEASE_ASSERT(!mComplete);
MOZ_DIAGNOSTIC_ASSERT(!mComplete);
mDisconnected = true;
}
@ -302,7 +302,7 @@ public:
ResolveMethodType aResolveMethod, RejectMethodType aRejectMethod)
{
MutexAutoLock lock(mMutex);
MOZ_RELEASE_ASSERT(!IsExclusive || !mHaveConsumer);
MOZ_DIAGNOSTIC_ASSERT(!IsExclusive || !mHaveConsumer);
mHaveConsumer = true;
nsRefPtr<ThenValueBase> thenValue = new ThenValue<TargetType, ThisType, ResolveMethodType,
RejectMethodType>(aResponseTarget, aThisVal,
@ -332,7 +332,7 @@ public:
void ChainTo(already_AddRefed<MediaPromise> aChainedPromise, const char* aCallSite)
{
MutexAutoLock lock(mMutex);
MOZ_RELEASE_ASSERT(!IsExclusive || !mHaveConsumer);
MOZ_DIAGNOSTIC_ASSERT(!IsExclusive || !mHaveConsumer);
mHaveConsumer = true;
nsRefPtr<MediaPromise> chainedPromise = aChainedPromise;
PROMISE_LOG("%s invoking Chain() [this=%p, chainedPromise=%p, isPending=%d]",
@ -507,13 +507,13 @@ public:
void Begin(already_AddRefed<typename PromiseType::Consumer> aConsumer)
{
MOZ_RELEASE_ASSERT(!Exists());
MOZ_DIAGNOSTIC_ASSERT(!Exists());
mConsumer = aConsumer;
}
void Complete()
{
MOZ_RELEASE_ASSERT(Exists());
MOZ_DIAGNOSTIC_ASSERT(Exists());
mConsumer = nullptr;
}

Просмотреть файл

@ -123,7 +123,7 @@ MediaSourceReader::RequestAudioData()
mAudioPromise.Reject(CANCELED, __func__);
return p;
}
MOZ_RELEASE_ASSERT(!mAudioSeekRequest.Exists());
MOZ_DIAGNOSTIC_ASSERT(!mAudioSeekRequest.Exists());
SwitchReaderResult ret = SwitchAudioReader(mLastAudioTime);
switch (ret) {
@ -157,7 +157,7 @@ void MediaSourceReader::DoAudioRequest()
void
MediaSourceReader::OnAudioDecoded(AudioData* aSample)
{
MOZ_RELEASE_ASSERT(!IsSeeking());
MOZ_DIAGNOSTIC_ASSERT(!IsSeeking());
mAudioRequest.Complete();
MSE_DEBUGV("MediaSourceReader(%p)::OnAudioDecoded [mTime=%lld mDuration=%lld mDiscontinuity=%d]",
@ -209,7 +209,7 @@ AdjustEndTime(int64_t* aEndTime, MediaDecoderReader* aReader)
void
MediaSourceReader::OnAudioNotDecoded(NotDecodedReason aReason)
{
MOZ_RELEASE_ASSERT(!IsSeeking());
MOZ_DIAGNOSTIC_ASSERT(!IsSeeking());
mAudioRequest.Complete();
MSE_DEBUG("MediaSourceReader(%p)::OnAudioNotDecoded aReason=%u IsEnded: %d", this, aReason, IsEnded());
@ -259,7 +259,7 @@ MediaSourceReader::RequestVideoData(bool aSkipToNextKeyframe, int64_t aTimeThres
mVideoPromise.Reject(CANCELED, __func__);
return p;
}
MOZ_RELEASE_ASSERT(!mVideoSeekRequest.Exists());
MOZ_DIAGNOSTIC_ASSERT(!mVideoSeekRequest.Exists());
SwitchReaderResult ret = SwitchVideoReader(mLastVideoTime);
switch (ret) {
@ -295,7 +295,7 @@ MediaSourceReader::DoVideoRequest()
void
MediaSourceReader::OnVideoDecoded(VideoData* aSample)
{
MOZ_RELEASE_ASSERT(!IsSeeking());
MOZ_DIAGNOSTIC_ASSERT(!IsSeeking());
mVideoRequest.Complete();
MSE_DEBUGV("MediaSourceReader(%p)::OnVideoDecoded [mTime=%lld mDuration=%lld mDiscontinuity=%d]",
@ -319,7 +319,7 @@ MediaSourceReader::OnVideoDecoded(VideoData* aSample)
void
MediaSourceReader::OnVideoNotDecoded(NotDecodedReason aReason)
{
MOZ_RELEASE_ASSERT(!IsSeeking());
MOZ_DIAGNOSTIC_ASSERT(!IsSeeking());
mVideoRequest.Complete();
MSE_DEBUG("MediaSourceReader(%p)::OnVideoNotDecoded aReason=%u IsEnded: %d", this, aReason, IsEnded());