Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: third_party/WebKit/Source/platform/Timer.h

Issue 2172153002: Move FrameLoader completion check timer to loading task runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't lazy create the frame scheduler Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0a9503f9e72360f70b0496b8b135b01f46b5a61b..8245b3adbf1a499f5fbfa49ee5816444badc9fcf 100644
--- a/third_party/WebKit/Source/platform/Timer.h
+++ b/third_party/WebKit/Source/platform/Timer.h
@@ -159,11 +159,18 @@ class Timer : public TimerBase {
public:
using TimerFiredFunction = void (TimerFiredClass::*)(Timer<TimerFiredClass>*);
+ // TODO(dcheng): Consider removing this overload once all timers are using the
+ // appropriate task runner. https://crbug.com/624694
Timer(TimerFiredClass* o, TimerFiredFunction f)
: m_object(o), m_function(f)
{
}
+ Timer(TimerFiredClass* o, TimerFiredFunction f, WebTaskRunner* webTaskRunner)
+ : TimerBase(webTaskRunner), m_object(o), m_function(f)
+ {
+ }
+
~Timer() override { }
protected:
@@ -181,11 +188,6 @@ protected:
return TimerIsObjectAliveTrait<TimerFiredClass>::isHeapObjectAlive(m_object);
}
- Timer(TimerFiredClass* o, TimerFiredFunction f, WebTaskRunner* webTaskRunner)
- : TimerBase(webTaskRunner), m_object(o), m_function(f)
- {
- }
-
private:
// FIXME: Oilpan: TimerBase should be moved to the heap and m_object should be traced.
// This raw pointer is safe as long as Timer<X> is held by the X itself (That's the case
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698