Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj

This commit is contained in:
Kyle Huey
2016-05-05 01:45:00 -07:00
parent 7bfda7e22f
commit b972c94d0f
238 changed files with 1046 additions and 1279 deletions

View File

@@ -842,8 +842,8 @@ void HTMLMediaElement::QueueLoadFromSourceTask()
{
ChangeDelayLoadStatus(true);
ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_LOADING);
RunInStableState(
NS_NewRunnableMethod(this, &HTMLMediaElement::LoadFromSourceChildren));
RefPtr<Runnable> r = NewRunnableMethod(this, &HTMLMediaElement::LoadFromSourceChildren);
RunInStableState(r);
}
void HTMLMediaElement::QueueSelectResourceTask()
@@ -853,8 +853,8 @@ void HTMLMediaElement::QueueSelectResourceTask()
return;
mHaveQueuedSelectResource = true;
ChangeNetworkState(nsIDOMHTMLMediaElement::NETWORK_NO_SOURCE);
RunInStableState(
NS_NewRunnableMethod(this, &HTMLMediaElement::SelectResourceWrapper));
RefPtr<Runnable> r = NewRunnableMethod(this, &HTMLMediaElement::SelectResourceWrapper);
RunInStableState(r);
}
NS_IMETHODIMP HTMLMediaElement::Load()
@@ -3171,9 +3171,9 @@ public:
{
nsCOMPtr<nsIRunnable> event;
if (aBlocked == BLOCKED) {
event = NS_NewRunnableMethod(this, &StreamListener::DoNotifyBlocked);
event = NewRunnableMethod(this, &StreamListener::DoNotifyBlocked);
} else {
event = NS_NewRunnableMethod(this, &StreamListener::DoNotifyUnblocked);
event = NewRunnableMethod(this, &StreamListener::DoNotifyUnblocked);
}
aGraph->DispatchToMainThreadAfterStreamStateUpdate(event.forget());
}
@@ -3182,7 +3182,7 @@ public:
{
if (event == EVENT_FINISHED) {
nsCOMPtr<nsIRunnable> event =
NS_NewRunnableMethod(this, &StreamListener::DoNotifyFinished);
NewRunnableMethod(this, &StreamListener::DoNotifyFinished);
aGraph->DispatchToMainThreadAfterStreamStateUpdate(event.forget());
}
}
@@ -3190,7 +3190,7 @@ public:
{
MutexAutoLock lock(mMutex);
nsCOMPtr<nsIRunnable> event =
NS_NewRunnableMethod(this, &StreamListener::DoNotifyHaveCurrentData);
NewRunnableMethod(this, &StreamListener::DoNotifyHaveCurrentData);
aGraph->DispatchToMainThreadAfterStreamStateUpdate(event.forget());
}
virtual void NotifyOutput(MediaStreamGraph* aGraph,
@@ -3201,7 +3201,7 @@ public:
return;
mPendingNotifyOutput = true;
nsCOMPtr<nsIRunnable> event =
NS_NewRunnableMethod(this, &StreamListener::DoNotifyOutput);
NewRunnableMethod(this, &StreamListener::DoNotifyOutput);
aGraph->DispatchToMainThreadAfterStreamStateUpdate(event.forget());
}
@@ -3253,7 +3253,7 @@ public:
if (c->mFrame.GetIntrinsicSize() != gfx::IntSize(0,0)) {
mInitialSizeFound = true;
nsCOMPtr<nsIRunnable> event =
NS_NewRunnableMethodWithArgs<gfx::IntSize>(
NewRunnableMethod<gfx::IntSize>(
this, &StreamSizeListener::ReceivedSize,
c->mFrame.GetIntrinsicSize());
aGraph->DispatchToMainThreadAfterStreamStateUpdate(event.forget());
@@ -4594,7 +4594,7 @@ void HTMLMediaElement::AddRemoveSelfReference()
// Dispatch Release asynchronously so that we don't destroy this object
// inside a call stack of method calls on this object
nsCOMPtr<nsIRunnable> event =
NS_NewRunnableMethod(this, &HTMLMediaElement::DoRemoveSelfReference);
NewRunnableMethod(this, &HTMLMediaElement::DoRemoveSelfReference);
NS_DispatchToMainThread(event);
}
}