Bug 1314833 - Part 2.1: Factor out AbstractThread::MainThread() used in Media Playback. r=billm,jwwang
MozReview-Commit-ID: 9yJi3iDtVZG
This commit is contained in:
@@ -3573,7 +3573,8 @@ NS_IMPL_ISUPPORTS(HTMLMediaElement::ShutdownObserver, nsIObserver)
|
||||
|
||||
HTMLMediaElement::HTMLMediaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
||||
: nsGenericHTMLElement(aNodeInfo),
|
||||
mWatchManager(this, AbstractThread::MainThread()),
|
||||
mAbstractMainThread(OwnerDoc()->AbstractMainThreadFor(TaskCategory::Other)),
|
||||
mWatchManager(this, mAbstractMainThread),
|
||||
mSrcStreamTracksAvailable(false),
|
||||
mSrcStreamPausedCurrentTime(-1),
|
||||
mShutdownObserver(new ShutdownObserver),
|
||||
@@ -4637,7 +4638,7 @@ nsresult HTMLMediaElement::FinishDecoderSetup(MediaDecoder* aDecoder,
|
||||
// Not every decoder will produce waitingForKey events, only add ones that can
|
||||
if (waitingForKeyProducer) {
|
||||
mWaitingForKeyListener = waitingForKeyProducer->Connect(
|
||||
AbstractThread::MainThread(), this, &HTMLMediaElement::CannotDecryptWaitingForKey);
|
||||
mAbstractMainThread, this, &HTMLMediaElement::CannotDecryptWaitingForKey);
|
||||
}
|
||||
|
||||
if (mChannelLoader) {
|
||||
@@ -7136,6 +7137,14 @@ HTMLMediaElement::UpdateCustomPolicyAfterPlayed()
|
||||
}
|
||||
}
|
||||
|
||||
AbstractThread*
|
||||
HTMLMediaElement::AbstractMainThread() const
|
||||
{
|
||||
MOZ_ASSERT(mAbstractMainThread);
|
||||
|
||||
return mAbstractMainThread;
|
||||
}
|
||||
|
||||
nsTArray<RefPtr<Promise>>
|
||||
HTMLMediaElement::TakePendingPlayPromises()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user