Bug 1258966 - Remove unnecessary null-checks of MediaDecoderStateMachine::mReader. r=bechen.
MozReview-Commit-ID: HXbFkSd3SZA
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1251,20 +1251,16 @@ void
MediaDecoderStateMachine::SetDormant(bool aDormant)
{
MOZ_ASSERT(OnTaskQueue());
if (IsShutdown()) {
return;
}
- if (!mReader) {
- return;
- }
-
if (mMetadataRequest.Exists()) {
if (mPendingDormant && mPendingDormant.ref() != aDormant && !aDormant) {
// We already have a dormant request pending; the new request would have
// resumed from dormant, we can just cancel any pending dormant requests.
mPendingDormant.reset();
} else {
mPendingDormant = Some(aDormant);
}