Bug 1076915 - Ensure that PostDelayedTask is always called on the controller thread. r=botond

This commit is contained in:
Kartikaya Gupta 2014-10-03 09:29:49 -04:00
Родитель 89be467df3
Коммит 86bc862d58
2 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -87,6 +87,7 @@ public:
/**
* Schedules a runnable to run on the controller/UI thread at some time
* in the future.
* This method must always be called on the controller thread.
*/
virtual void PostDelayedTask(Task* aTask, int aDelayMs) = 0;

Просмотреть файл

@ -3138,6 +3138,7 @@ AsyncPanZoomController::GetZoomConstraints() const
void AsyncPanZoomController::PostDelayedTask(Task* aTask, int aDelayMs) {
AssertOnControllerThread();
nsRefPtr<GeckoContentController> controller = GetGeckoContentController();
if (controller) {
controller->PostDelayedTask(aTask, aDelayMs);