Bug 1336527 Define RegisterIdlePeriod
MozReview-Commit-ID: A41UJ6OHvP7
--- 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.