mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Bug 1217251 - In TaskThrottler, dispatch the timeout task correctly from the Java UI thread on Android. r=kats
--HG-- extra : source : 4d35b236cec7651049af00eac2dd38ba868c6cdd
This commit is contained in:
parent
534b661e0d
commit
e2037b8b38
@ -6,7 +6,7 @@
|
||||
|
||||
#include "TaskThrottler.h"
|
||||
|
||||
#include "base/message_loop.h"
|
||||
#include "mozilla/layers/APZThreadUtils.h"
|
||||
|
||||
#define TASK_LOG(...)
|
||||
// #define TASK_LOG(...) printf_stderr("TASK: " __VA_ARGS__)
|
||||
@ -49,8 +49,7 @@ TaskThrottler::PostTask(const tracked_objects::Location& aLocation,
|
||||
// even if we don't get a TaskComplete() until then.
|
||||
TimeDuration timeout = mMaxWait - TimeSinceLastRequest(aTimeStamp, lock);
|
||||
mTimeoutTask = NewRunnableMethod(this, &TaskThrottler::OnTimeout);
|
||||
MessageLoop::current()->PostDelayedTask(FROM_HERE, mTimeoutTask,
|
||||
timeout.ToMilliseconds());
|
||||
APZThreadUtils::RunDelayedTaskOnCurrentThread(mTimeoutTask, timeout);
|
||||
return;
|
||||
}
|
||||
// we've been waiting for more than the max-wait limit, so just fall through
|
||||
|
Loading…
Reference in New Issue
Block a user