Bug 1409270. P2 - replace the use of mWatchManager.ManualNotify() with direct calls. r=gerald

MozReview-Commit-ID: I0t0Wp9lnAa
This commit is contained in:
JW Wang
2017-10-17 14:52:38 +08:00
parent d7b511f6a7
commit 4932b65aa3

View File

@@ -2280,7 +2280,7 @@ void HTMLMediaElement::NotifyMediaStreamTracksAvailable(DOMMediaStream* aStream)
NotifyOwnerDocumentActivityChanged();
}
mWatchManager.ManualNotify(&HTMLMediaElement::UpdateReadyStateInternal);
UpdateReadyStateInternal();
}
void HTMLMediaElement::DealWithFailedElement(nsIContent* aSourceElement)
@@ -5422,7 +5422,7 @@ HTMLMediaElement::NotifyMediaStreamTrackAdded(const RefPtr<MediaStreamTrack>& aT
}
}
mWatchManager.ManualNotify(&HTMLMediaElement::UpdateReadyStateInternal);
UpdateReadyStateInternal();
}
void
@@ -5506,8 +5506,6 @@ HTMLMediaElement::MetadataLoaded(const MediaInfo* aInfo,
mPendingEncryptedInitData.Reset();
}
mWatchManager.ManualNotify(&HTMLMediaElement::UpdateReadyStateInternal);
if (IsVideo() && aInfo->HasVideo()) {
// We are a video element playing video so update the screen wakelock
NotifyOwnerDocumentActivityChanged();
@@ -5518,6 +5516,8 @@ HTMLMediaElement::MetadataLoaded(const MediaInfo* aInfo,
mDefaultPlaybackStartPosition = 0.0;
}
UpdateReadyStateInternal();
if (!mSrcStream) {
return;
}
@@ -6436,7 +6436,7 @@ void HTMLMediaElement::UpdateMediaSize(const nsIntSize& aSize)
}
mMediaInfo.mVideo.mDisplay = aSize;
mWatchManager.ManualNotify(&HTMLMediaElement::UpdateReadyStateInternal);
UpdateReadyStateInternal();
}
void HTMLMediaElement::UpdateInitialMediaSize(const nsIntSize& aSize)