Bug 957691 - Restore assertions. r=karlt

MozReview-Commit-ID: 1guHCRCzQjS

--HG--
extra : rebase_source : 64705edf4a784d43602b2f1de8d9594d0990d801
This commit is contained in:
Andreas Pehrson 2016-04-21 11:44:35 +02:00
parent 190dbc551b
commit 3683deb67f
3 changed files with 5 additions and 5 deletions

View File

@ -416,7 +416,7 @@ protected:
StreamTime aStart, StreamTime aEnd)
{
MOZ_ASSERT(aStart <= aEnd, "Endpoints inverted");
NS_WARN_IF_FALSE(aStart >= 0 && aEnd <= aSource.mDuration, "Slice out of range");
NS_ASSERTION(aStart >= 0 && aEnd <= aSource.mDuration, "Slice out of range");
mDuration += aEnd - aStart;
StreamTime offset = 0;
for (uint32_t i = 0; i < aSource.mChunks.Length() && offset < aEnd; ++i) {

View File

@ -1439,9 +1439,9 @@ MediaStreamGraphImpl::Process()
} else {
ps->ProcessInput(mProcessedTime, mStateComputedTime,
ProcessedMediaStream::ALLOW_FINISH);
NS_WARN_IF_FALSE(stream->mTracks.GetEnd() >=
GraphTimeToStreamTimeWithBlocking(stream, mStateComputedTime),
"Stream did not produce enough data");
NS_ASSERTION(stream->mTracks.GetEnd() >=
GraphTimeToStreamTimeWithBlocking(stream, mStateComputedTime),
"Stream did not produce enough data");
}
}
}

View File

@ -31,7 +31,7 @@ inline TrackTicks RateConvertTicksRoundDown(TrackRate aOutRate,
{
NS_ASSERTION(0 < aOutRate && aOutRate <= TRACK_RATE_MAX, "Bad out rate");
NS_ASSERTION(0 < aInRate && aInRate <= TRACK_RATE_MAX, "Bad in rate");
NS_WARN_IF_FALSE(0 <= aTicks && aTicks <= TRACK_TICKS_MAX, "Bad ticks"); // bug 957691
NS_ASSERTION(0 <= aTicks && aTicks <= TRACK_TICKS_MAX, "Bad ticks");
return (aTicks * aOutRate) / aInRate;
}
inline TrackTicks RateConvertTicksRoundUp(TrackRate aOutRate,