Bug 1341555 - Consolidate use of the MSG's AbstractMainThread, and stop having AbstractMainThread on MediaStreams. r=pehrsons
MozReview-Commit-ID: 5hGDQcfpH6a
This commit is contained in:
@@ -4869,8 +4869,7 @@ public:
|
||||
mBlocked(false),
|
||||
mFinished(false),
|
||||
mMutex(aName),
|
||||
mPendingNotifyOutput(false),
|
||||
mAbstractMainThread(aElement->AbstractMainThread())
|
||||
mPendingNotifyOutput(false)
|
||||
{}
|
||||
void Forget()
|
||||
{
|
||||
@@ -4938,14 +4937,12 @@ public:
|
||||
this,
|
||||
&StreamListener::DoNotifyUnblocked);
|
||||
}
|
||||
aGraph->DispatchToMainThreadAfterStreamStateUpdate(mAbstractMainThread,
|
||||
event.forget());
|
||||
aGraph->DispatchToMainThreadAfterStreamStateUpdate(event.forget());
|
||||
}
|
||||
virtual void NotifyHasCurrentData(MediaStreamGraph* aGraph) override
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
aGraph->DispatchToMainThreadAfterStreamStateUpdate(
|
||||
mAbstractMainThread,
|
||||
NewRunnableMethod(
|
||||
"dom::HTMLMediaElement::StreamListener::DoNotifyHaveCurrentData",
|
||||
this,
|
||||
@@ -4959,7 +4956,6 @@ public:
|
||||
return;
|
||||
mPendingNotifyOutput = true;
|
||||
aGraph->DispatchToMainThreadAfterStreamStateUpdate(
|
||||
mAbstractMainThread,
|
||||
NewRunnableMethod("dom::HTMLMediaElement::StreamListener::DoNotifyOutput",
|
||||
this,
|
||||
&StreamListener::DoNotifyOutput));
|
||||
@@ -4975,7 +4971,6 @@ private:
|
||||
// mMutex protects the fields below; they can be accessed on any thread
|
||||
Mutex mMutex;
|
||||
bool mPendingNotifyOutput;
|
||||
const RefPtr<AbstractThread> mAbstractMainThread;
|
||||
};
|
||||
|
||||
class HTMLMediaElement::MediaStreamTracksAvailableCallback:
|
||||
|
||||
Reference in New Issue
Block a user