| Index: third_party/WebKit/Source/platform/Timer.h
|
| diff --git a/third_party/WebKit/Source/platform/Timer.h b/third_party/WebKit/Source/platform/Timer.h
|
| index 1af4cfc73f99c84528e75b29655686d30c1ca2cc..caddaee9d5175a4f48366790666888a9ea6b69b5 100644
|
| --- a/third_party/WebKit/Source/platform/Timer.h
|
| +++ b/third_party/WebKit/Source/platform/Timer.h
|
| @@ -46,7 +46,7 @@ class PLATFORM_EXPORT TimerBase {
|
| WTF_MAKE_NONCOPYABLE(TimerBase);
|
|
|
| public:
|
| - explicit TimerBase(WebTaskRunner*);
|
| + explicit TimerBase(RefPtr<WebTaskRunner>);
|
| virtual ~TimerBase();
|
|
|
| void start(double nextFireInterval,
|
| @@ -75,20 +75,20 @@ class PLATFORM_EXPORT TimerBase {
|
| m_repeatInterval += delta;
|
| }
|
|
|
| - void moveToNewTaskRunner(WebTaskRunner*);
|
| + void moveToNewTaskRunner(RefPtr<WebTaskRunner>);
|
|
|
| struct PLATFORM_EXPORT Comparator {
|
| bool operator()(const TimerBase* a, const TimerBase* b) const;
|
| };
|
|
|
| protected:
|
| - static WebTaskRunner* getTimerTaskRunner();
|
| - static WebTaskRunner* getUnthrottledTaskRunner();
|
| + static RefPtr<WebTaskRunner> getTimerTaskRunner();
|
| + static RefPtr<WebTaskRunner> getUnthrottledTaskRunner();
|
|
|
| private:
|
| virtual void fired() = 0;
|
|
|
| - virtual WebTaskRunner* timerTaskRunner() const;
|
| + virtual RefPtr<WebTaskRunner> timerTaskRunner() const;
|
|
|
| NO_SANITIZE_ADDRESS
|
| virtual bool canFire() const { return true; }
|
| @@ -102,7 +102,7 @@ class PLATFORM_EXPORT TimerBase {
|
| double m_nextFireTime; // 0 if inactive
|
| double m_repeatInterval; // 0 if not repeating
|
| WebTraceLocation m_location;
|
| - std::unique_ptr<WebTaskRunner> m_webTaskRunner;
|
| + RefPtr<WebTaskRunner> m_webTaskRunner;
|
|
|
| #if DCHECK_IS_ON()
|
| ThreadIdentifier m_thread;
|
| @@ -133,10 +133,10 @@ class TaskRunnerTimer : public TimerBase {
|
| public:
|
| using TimerFiredFunction = void (TimerFiredClass::*)(TimerBase*);
|
|
|
| - TaskRunnerTimer(WebTaskRunner* webTaskRunner,
|
| + TaskRunnerTimer(RefPtr<WebTaskRunner> webTaskRunner,
|
| TimerFiredClass* o,
|
| TimerFiredFunction f)
|
| - : TimerBase(webTaskRunner), m_object(o), m_function(f) {}
|
| + : TimerBase(std::move(webTaskRunner)), m_object(o), m_function(f) {}
|
|
|
| ~TaskRunnerTimer() override {}
|
|
|
|
|