Bug 1336527 Define RegisterIdlePeriod draft
authorTom Ritter <tom@mozilla.com>
Fri, 17 Feb 2017 13:29:12 -0600
changeset 486277 3368eb16659c6238b53384b7e6e98bd4a80e213d
parent 484626 ec3ef9f77a52693e9732ca480df16017af0d9504
child 488256 16701ca7573a33e5a63faa3c3f6256bdf7949fb9
push id45946
push userbmo:tom@mozilla.com
push dateFri, 17 Feb 2017 19:32:11 +0000
bugs1336527
milestone54.0a1
Bug 1336527 Define RegisterIdlePeriod MozReview-Commit-ID: A41UJ6OHvP7
dom/workers/WorkerThread.h
--- a/dom/workers/WorkerThread.h
+++ b/dom/workers/WorkerThread.h
@@ -72,16 +72,24 @@ public:
 
   nsresult
   DispatchAnyThread(const WorkerThreadFriendKey& aKey,
            already_AddRefed<WorkerRunnable> aWorkerRunnable);
 
   uint32_t
   RecursionDepth(const WorkerThreadFriendKey& aKey) const;
 
+  // Required for MinGW build #1336527 to handle compiler bug:
+  // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79582
+  NS_IMETHOD
+  RegisterIdlePeriod(already_AddRefed<nsIIdlePeriod> aIdlePeriod) override
+  {
+    return nsThread::RegisterIdlePeriod(already_AddRefed<nsIIdlePeriod>(aIdlePeriod.take()));
+  }
+
   NS_DECL_ISUPPORTS_INHERITED
 
 private:
   WorkerThread();
   ~WorkerThread();
 
   // This should only be called by consumers that have an
   // nsIEventTarget/nsIThread pointer.