Bug 1351148 Part1: Add include header to TimerThread.h to fix compile errors. r=smaug.
authorStone Shih <sshih@mozilla.com>
Mon, 29 May 2017 17:19:17 +0800
changeset 418890 420d9e53c959cf2bdbfd8f70680cf65de65b76e0
parent 418731 bb33237155278066423e2fdc3de2785eb44a75e7
child 418891 284af26c1b5328bad6c0de78ab229035c520ee7c
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1351148
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1351148 Part1: Add include header to TimerThread.h to fix compile errors. r=smaug. MozReview-Commit-ID: 65UfFMwmSrm
xpcom/threads/TimerThread.h
xpcom/threads/nsTimerImpl.h
--- a/xpcom/threads/TimerThread.h
+++ b/xpcom/threads/TimerThread.h
@@ -14,16 +14,17 @@
 #include "nsTimerImpl.h"
 #include "nsThreadUtils.h"
 
 #include "nsTArray.h"
 
 #include "mozilla/Atomics.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Monitor.h"
+#include "mozilla/UniquePtr.h"
 
 #include <algorithm>
 
 namespace mozilla {
 class TimeStamp;
 } // namespace mozilla
 
 class TimerThread final
@@ -105,30 +106,31 @@ private:
     {
       if (mTimerImpl) {
         mTimerImpl->SetHolder(nullptr);
       }
       return mTimerImpl.forget();
     }
 
     static bool
-    UniquePtrLessThan(UniquePtr<Entry>& aLeft, UniquePtr<Entry>& aRight)
+    UniquePtrLessThan(mozilla::UniquePtr<Entry>& aLeft,
+                      mozilla::UniquePtr<Entry>& aRight)
     {
       // This is reversed because std::push_heap() sorts the "largest" to
       // the front of the heap.  We want that to be the earliest timer.
       return aRight->mTimeout < aLeft->mTimeout;
     }
 
     TimeStamp Timeout() const
     {
       return mTimeout;
     }
   };
 
-  nsTArray<UniquePtr<Entry>> mTimers;
+  nsTArray<mozilla::UniquePtr<Entry>> mTimers;
   uint32_t mAllowedEarlyFiringMicroseconds;
 };
 
 struct TimerAdditionComparator
 {
   TimerAdditionComparator(const mozilla::TimeStamp& aNow,
                           nsTimerImpl* aTimerToInsert) :
     now(aNow)
--- a/xpcom/threads/nsTimerImpl.h
+++ b/xpcom/threads/nsTimerImpl.h
@@ -127,17 +127,17 @@ public:
     Name mName;
 
     void*                 mClosure;
   };
 
   nsresult InitCommon(uint32_t aDelayMS, uint32_t aType,
                       Callback&& newCallback);
 
-  nsresult InitCommon(const TimeDuration& aDelay, uint32_t aType,
+  nsresult InitCommon(const mozilla::TimeDuration& aDelay, uint32_t aType,
                       Callback&& newCallback);
 
   Callback& GetCallback()
   {
     mMutex.AssertCurrentThreadOwns();
     if (mCallback.mType == Callback::Type::Unknown) {
       return mCallbackDuringFire;
     }
@@ -195,19 +195,19 @@ public:
   uint8_t               mType;
 
   // The generation number of this timer, re-generated each time the timer is
   // initialized so one-shot timers can be canceled and re-initialized by the
   // arming thread without any bad race conditions.
   // Updated only after this timer has been removed from the timer thread.
   int32_t               mGeneration;
 
-  TimeDuration          mDelay;
+  mozilla::TimeDuration mDelay;
   // Updated only after this timer has been removed from the timer thread.
-  TimeStamp             mTimeout;
+  mozilla::TimeStamp    mTimeout;
 
 #ifdef MOZ_TASK_TRACER
   mozilla::tasktracer::TracedTaskCommon mTracedTask;
 #endif
 
   static double         sDeltaSum;
   static double         sDeltaSumSquared;
   static double         sDeltaNum;