| Index: Source/platform/ThreadTimers.h
|
| diff --git a/Source/platform/ThreadTimers.h b/Source/platform/ThreadTimers.h
|
| index cba13bc3b940b1c3ff8bdae4dc7ec944a6f1533d..052df247969cb2e5f427923110e39f4e203622d2 100644
|
| --- a/Source/platform/ThreadTimers.h
|
| +++ b/Source/platform/ThreadTimers.h
|
| @@ -28,6 +28,7 @@
|
| #define ThreadTimers_h
|
|
|
| #include "platform/PlatformExport.h"
|
| +#include "platform/TimerHeap.h"
|
| #include "wtf/Noncopyable.h"
|
| #include "wtf/HashSet.h"
|
| #include "wtf/Vector.h"
|
| @@ -38,7 +39,7 @@ class SharedTimer;
|
| class TimerBase;
|
|
|
| // A collection of timers per thread. Kept in PlatformThreadData.
|
| -class PLATFORM_EXPORT ThreadTimers {
|
| +class PLATFORM_EXPORT ThreadTimers : public TimerQueueObserver {
|
| WTF_MAKE_NONCOPYABLE(ThreadTimers); WTF_MAKE_FAST_ALLOCATED;
|
| public:
|
| ThreadTimers();
|
| @@ -46,7 +47,7 @@ public:
|
| // On a thread different then main, we should set the thread's instance of the SharedTimer.
|
| void setSharedTimer(SharedTimer*);
|
|
|
| - Vector<TimerBase*>& timerHeap() { return m_timerHeap; }
|
| + TimerHeap& timerHeap() { return m_timerHeap; }
|
|
|
| void updateSharedTimer();
|
| void fireTimersInNestedEventLoop();
|
| @@ -54,10 +55,13 @@ public:
|
| private:
|
| static void sharedTimerFired();
|
|
|
| + // TimerQueueObserver
|
| + virtual void nextFiringTimerChanged() override;
|
| +
|
| void sharedTimerFiredInternal();
|
| void fireTimersInNestedEventLoopInternal();
|
|
|
| - Vector<TimerBase*> m_timerHeap;
|
| + TimerHeap m_timerHeap;
|
| SharedTimer* m_sharedTimer; // External object, can be a run loop on a worker thread. Normally set/reset by worker thread.
|
| bool m_firingTimers; // Reentrancy guard.
|
| double m_pendingSharedTimerFireTime;
|
|
|