Bug 1429009. P2 - remove unnecessary AbstractThread::AutoEnter. draft
authorJW Wang <jwwang@mozilla.com>
Tue, 09 Jan 2018 17:49:53 +0800
changeset 718311 6ac989510006a56bcb1021d422820377e178455a
parent 718310 5b7361b935d5b405fb140fa73f4b7578a6da3ffd
child 718312 09029796dc3e7788c3031485db7133a343d3a637
push id94872
push userjwwang@mozilla.com
push dateWed, 10 Jan 2018 02:03:34 +0000
bugs1429009
milestone59.0a1
Bug 1429009. P2 - remove unnecessary AbstractThread::AutoEnter. It is not needed since we are already in the right context. MozReview-Commit-ID: 6QXxLMQHavv
dom/media/ChannelMediaDecoder.cpp
--- 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,