зеркало из https://github.com/mozilla/gecko-dev.git
bug 1529399 remove now-unnecessary aDrainDirectTasks parameter from EventTargetWrapper::Runner constructor r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D20605 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a18b25dacc
Коммит
df3203f7f5
|
@ -53,9 +53,7 @@ class EventTargetWrapper : public AbstractThread {
|
|||
std::move(aRunnable));
|
||||
}
|
||||
|
||||
RefPtr<nsIRunnable> runner(
|
||||
new Runner(this, std::move(aRunnable),
|
||||
false /* already drained by TaskGroupRunnable */));
|
||||
RefPtr<nsIRunnable> runner = new Runner(this, std::move(aRunnable));
|
||||
return mTarget->Dispatch(runner.forget(), NS_DISPATCH_NORMAL);
|
||||
}
|
||||
|
||||
|
@ -117,25 +115,17 @@ class EventTargetWrapper : public AbstractThread {
|
|||
|
||||
public:
|
||||
explicit Runner(EventTargetWrapper* aThread,
|
||||
already_AddRefed<nsIRunnable> aRunnable,
|
||||
bool aDrainDirectTasks)
|
||||
already_AddRefed<nsIRunnable> aRunnable)
|
||||
: CancelableRunnable("EventTargetWrapper::Runner"),
|
||||
mThread(aThread),
|
||||
mRunnable(aRunnable),
|
||||
mDrainDirectTasks(aDrainDirectTasks) {}
|
||||
mRunnable(aRunnable) {}
|
||||
|
||||
NS_IMETHOD Run() override {
|
||||
AutoTaskGuard taskGuard(mThread);
|
||||
|
||||
MOZ_ASSERT(mThread == AbstractThread::GetCurrent());
|
||||
MOZ_ASSERT(mThread->IsCurrentThreadIn());
|
||||
nsresult rv = mRunnable->Run();
|
||||
|
||||
if (mDrainDirectTasks) {
|
||||
mThread->TailDispatcher().DrainDirectTasks();
|
||||
}
|
||||
|
||||
return rv;
|
||||
return mRunnable->Run();
|
||||
}
|
||||
|
||||
nsresult Cancel() override {
|
||||
|
@ -172,7 +162,6 @@ class EventTargetWrapper : public AbstractThread {
|
|||
private:
|
||||
RefPtr<EventTargetWrapper> mThread;
|
||||
RefPtr<nsIRunnable> mRunnable;
|
||||
bool mDrainDirectTasks;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче