зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1162720 - Rename CallbackRunnable::New to NewRunnableFrom. r=jesup
This commit is contained in:
Родитель
dc2c1e74ca
Коммит
c2230eeb1d
|
@ -2242,7 +2242,7 @@ MediaManager::Observe(nsISupports* aSubject, const char* aTopic,
|
|||
// cleared until the lambda function clears it.
|
||||
|
||||
MediaManager::GetMessageLoop()->PostTask(FROM_HERE, new ShutdownTask(
|
||||
media::CallbackRunnable::New([this]() mutable {
|
||||
media::NewRunnableFrom([this]() mutable {
|
||||
// Close off any remaining active windows.
|
||||
MutexAutoLock lock(mMutex);
|
||||
GetActiveWindows()->Clear();
|
||||
|
|
|
@ -167,13 +167,11 @@ protected:
|
|||
|
||||
// General purpose runnable with an eye toward lambdas
|
||||
|
||||
namespace CallbackRunnable
|
||||
{
|
||||
template<typename OnRunType>
|
||||
class Impl : public nsRunnable
|
||||
class LambdaRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
explicit Impl(OnRunType& aOnRun) : mOnRun(aOnRun) {}
|
||||
explicit LambdaRunnable(OnRunType& aOnRun) : mOnRun(aOnRun) {}
|
||||
private:
|
||||
NS_IMETHODIMP
|
||||
Run()
|
||||
|
@ -184,11 +182,10 @@ private:
|
|||
};
|
||||
|
||||
template<typename OnRunType>
|
||||
Impl<OnRunType>*
|
||||
New(OnRunType aOnRun)
|
||||
LambdaRunnable<OnRunType>*
|
||||
NewRunnableFrom(OnRunType aOnRun)
|
||||
{
|
||||
return new Impl<OnRunType>(aOnRun);
|
||||
}
|
||||
return new LambdaRunnable<OnRunType>(aOnRun);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче