Bug 1429009. P2 - remove unnecessary AbstractThread::AutoEnter.
It is not needed since we are already in the right context.
MozReview-Commit-ID: 6QXxLMQHavv
--- a/dom/media/ChannelMediaDecoder.cpp
+++ b/dom/media/ChannelMediaDecoder.cpp
@@ -434,17 +434,16 @@ ChannelMediaDecoder::DownloadProgressed(
__func__,
[ =, self = RefPtr<ChannelMediaDecoder>(this) ](MediaStatistics aStats) {
if (IsShutdown()) {
return;
}
mCanPlayThrough = aStats.CanPlayThrough();
GetStateMachine()->DispatchCanPlayThrough(mCanPlayThrough);
mResource->ThrottleReadahead(ShouldThrottleDownload(aStats));
- AbstractThread::AutoEnter context(AbstractMainThread());
// Update readyState since mCanPlayThrough might have changed.
GetOwner()->UpdateReadyState();
},
[]() { MOZ_ASSERT_UNREACHABLE("Promise not resolved"); });
}
/* static */ ChannelMediaDecoder::PlaybackRateInfo
ChannelMediaDecoder::ComputePlaybackRate(const MediaChannelStatistics& aStats,