Bug 1771411 - Use LifecycleStateRef() in an MTG lifecycle assertion. r=karlt

Differential Revision: https://phabricator.services.mozilla.com/D148115
This commit is contained in:
Paul Adenot 2022-06-03 10:04:35 +00:00
parent 5e438354e2
commit f40adcf8b3

View File

@ -3810,14 +3810,9 @@ void MediaTrackGraphImpl::PendingResumeOperation::Apply(
void MediaTrackGraphImpl::PendingResumeOperation::Abort() {
// The graph is shutting down before the operation completed.
#ifdef DEBUG
{
MonitorAutoLock lock(mDestinationTrack->GraphImpl()->mMonitor);
MOZ_ASSERT(!mDestinationTrack->GraphImpl() ||
mDestinationTrack->GraphImpl()->mLifecycleState ==
MediaTrackGraphImpl::LIFECYCLE_WAITING_FOR_THREAD_SHUTDOWN);
}
#endif
MOZ_ASSERT(!mDestinationTrack->GraphImpl() ||
mDestinationTrack->GraphImpl()->LifecycleStateRef() ==
MediaTrackGraphImpl::LIFECYCLE_WAITING_FOR_THREAD_SHUTDOWN);
mHolder.Reject(false, __func__);
}