зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1586370 - Tighten some MTG threading asserts. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D56079 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a8f9785f19
Коммит
7e49593412
|
@ -125,7 +125,7 @@ TrackTime MediaTrackGraphImpl::GraphTimeToTrackTimeWithBlocking(
|
|||
}
|
||||
|
||||
GraphTime MediaTrackGraphImpl::IterationEnd() const {
|
||||
MOZ_ASSERT(OnGraphThreadOrNotRunning());
|
||||
MOZ_ASSERT(OnGraphThread());
|
||||
return CurrentDriver()->IterationEnd();
|
||||
}
|
||||
|
||||
|
@ -676,7 +676,7 @@ nsresult MediaTrackGraphImpl::OpenAudioInput(CubebUtils::AudioDeviceID aID,
|
|||
|
||||
void MediaTrackGraphImpl::CloseAudioInputImpl(
|
||||
Maybe<CubebUtils::AudioDeviceID>& aID, AudioDataListener* aListener) {
|
||||
MOZ_ASSERT(OnGraphThreadOrNotRunning());
|
||||
MOZ_ASSERT(OnGraphThread());
|
||||
// It is possible to not know the ID here, find it first.
|
||||
if (aID.isNothing()) {
|
||||
for (auto iter = mInputDeviceUsers.Iter(); !iter.Done(); iter.Next()) {
|
||||
|
|
|
@ -854,6 +854,8 @@ class MediaTrackGraphImpl : public MediaTrackGraph,
|
|||
#if DEBUG
|
||||
if (mGraphDriverRunning) {
|
||||
mMonitor.AssertCurrentThreadOwns();
|
||||
} else {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
}
|
||||
#endif
|
||||
return mLifecycleState;
|
||||
|
@ -862,6 +864,8 @@ class MediaTrackGraphImpl : public MediaTrackGraph,
|
|||
#if DEBUG
|
||||
if (mGraphDriverRunning) {
|
||||
mMonitor.AssertCurrentThreadOwns();
|
||||
} else {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
}
|
||||
#endif
|
||||
return mLifecycleState;
|
||||
|
|
Загрузка…
Ссылка в новой задаче