Bug 1268517 - Remove unused function. r?botond draft
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 28 Apr 2016 11:18:58 -0400
changeset 357385 866d0521580f5859955469257db3de9ab7b9ba64
parent 357384 95a15364952f0f6ea4ba1bcdfb4b07b41de10f0b
child 357403 e461be15ff9126bb5ca396a6f29b1b21a112498d
push id16757
push userkgupta@mozilla.com
push dateThu, 28 Apr 2016 15:19:41 +0000
reviewersbotond
bugs1268517
milestone49.0a1
Bug 1268517 - Remove unused function. r?botond MozReview-Commit-ID: 7E9gZhizUZt
gfx/layers/apz/util/APZThreadUtils.cpp
gfx/layers/apz/util/APZThreadUtils.h
--- a/gfx/layers/apz/util/APZThreadUtils.cpp
+++ b/gfx/layers/apz/util/APZThreadUtils.cpp
@@ -75,33 +75,16 @@ APZThreadUtils::RunOnControllerThread(al
   if (sControllerThread == MessageLoop::current()) {
     task->Run();
   } else {
     sControllerThread->PostTask(task.forget());
   }
 #endif
 }
 
-/*static*/ void
-APZThreadUtils::RunDelayedTaskOnCurrentThread(already_AddRefed<Runnable> aTask,
-                                              const TimeDuration& aDelay)
-{
-  if (MessageLoop* messageLoop = MessageLoop::current()) {
-    messageLoop->PostDelayedTask(Move(aTask), aDelay.ToMilliseconds());
-  } else {
-#ifdef MOZ_ANDROID_APZ
-    // Fennec does not have a MessageLoop::current() on the controller thread.
-    AndroidBridge::Bridge()->PostTaskToUiThread(Move(aTask), aDelay.ToMilliseconds());
-#else
-    // Other platforms should.
-    MOZ_RELEASE_ASSERT(false, "This non-Fennec platform should have a MessageLoop::current()");
-#endif
-  }
-}
-
 /*static*/ bool
 APZThreadUtils::IsControllerThread()
 {
 #ifdef MOZ_ANDROID_APZ
   return AndroidBridge::IsJavaUiThread();
 #else
   return sControllerThread == MessageLoop::current();
 #endif
--- a/gfx/layers/apz/util/APZThreadUtils.h
+++ b/gfx/layers/apz/util/APZThreadUtils.h
@@ -49,22 +49,16 @@ public:
   /**
    * Run the given task on the APZ "controller thread" for this platform. If
    * this function is called from the controller thread itself then the task is
    * run immediately without getting queued.
    */
   static void RunOnControllerThread(already_AddRefed<Runnable> aTask);
 
   /**
-   * Runs the given task on the current thread after a delay of |aDelay|.
-   */
-  static void RunDelayedTaskOnCurrentThread(already_AddRefed<Runnable> aTask,
-                                            const TimeDuration& aDelay);
-
-  /**
    * Returns true if currently on APZ "controller thread".
    */
   static bool IsControllerThread();
 };
 
 // A base class for GenericTimerCallback<Function>.
 // This is necessary because NS_IMPL_ISUPPORTS doesn't work for a class
 // template.