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
parent eb08238087
commit 3b2421c388
2 changed files with 2 additions and 0 deletions

View File

@ -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;

View File

@ -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);