mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-27 01:29:57 +00:00
Add additional assertions to the MDSM
This commit is contained in:
@@ -797,6 +797,7 @@ MediaDecoderStateMachine::OnAudioDecoded(AudioData* aAudioSample)
|
||||
void
|
||||
MediaDecoderStateMachine::Push(AudioData* aSample)
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
MOZ_ASSERT(aSample);
|
||||
// TODO: Send aSample to MSG and recalculate readystate before pushing,
|
||||
// otherwise AdvanceFrame may pop the sample before we have a chance
|
||||
@@ -814,6 +815,7 @@ MediaDecoderStateMachine::Push(AudioData* aSample)
|
||||
void
|
||||
MediaDecoderStateMachine::Push(VideoData* aSample)
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
MOZ_ASSERT(aSample);
|
||||
// TODO: Send aSample to MSG and recalculate readystate before pushing,
|
||||
// otherwise AdvanceFrame may pop the sample before we have a chance
|
||||
@@ -1176,6 +1178,7 @@ void MediaDecoderStateMachine::StopPlayback()
|
||||
|
||||
void MediaDecoderStateMachine::MaybeStartPlayback()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
AssertCurrentThreadInMonitor();
|
||||
if (IsPlaying()) {
|
||||
// Logging this case is really spammy - don't do it.
|
||||
@@ -1232,6 +1235,7 @@ void MediaDecoderStateMachine::UpdatePlaybackPositionInternal(int64_t aTime)
|
||||
|
||||
void MediaDecoderStateMachine::UpdatePlaybackPosition(int64_t aTime)
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
UpdatePlaybackPositionInternal(aTime);
|
||||
|
||||
bool fragmentEnded = mFragmentEndTime >= 0 && GetMediaTime() >= mFragmentEndTime;
|
||||
@@ -1727,6 +1731,7 @@ MediaDecoderStateMachine::SetReaderIdle()
|
||||
void
|
||||
MediaDecoderStateMachine::DispatchDecodeTasksIfNeeded()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
AssertCurrentThreadInMonitor();
|
||||
|
||||
if (mState != DECODER_STATE_DECODING &&
|
||||
@@ -2168,6 +2173,7 @@ MediaDecoderStateMachine::OnMetadataNotRead(ReadMetadataFailureReason aReason)
|
||||
void
|
||||
MediaDecoderStateMachine::EnqueueLoadedMetadataEvent()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
nsAutoPtr<MediaInfo> info(new MediaInfo());
|
||||
*info = mInfo;
|
||||
MediaDecoderEventVisibility visibility = mSentLoadedMetadataEvent?
|
||||
@@ -2182,6 +2188,7 @@ MediaDecoderStateMachine::EnqueueLoadedMetadataEvent()
|
||||
void
|
||||
MediaDecoderStateMachine::EnqueueFirstFrameLoadedEvent()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
nsAutoPtr<MediaInfo> info(new MediaInfo());
|
||||
*info = mInfo;
|
||||
MediaDecoderEventVisibility visibility = mSentFirstFrameLoadedEvent?
|
||||
|
||||
Reference in New Issue
Block a user