Changeset 162300 in webkit
- Timestamp:
- Jan 19, 2014 8:13:16 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r162276 r162300 1 2014-01-19 Jinwoo Song <jinwoo7.song@samsung.com> 2 3 [EFL][WK2] build fix after r162276 4 https://bugs.webkit.org/show_bug.cgi?id=127259 5 6 Reviewed by Anders Carlsson. 7 8 * Platform/efl/DispatchQueueEfl.cpp: 9 (DispatchQueue::performTimerWork): 10 (DispatchQueue::getNextTimeOut): 11 * Platform/efl/DispatchQueueWorkItemEfl.h: 12 (WorkItem::create): 13 (WorkItem::WorkItem): 14 (TimerWorkItem::create): 15 (TimerWorkItem::TimerWorkItem): 16 * Platform/efl/WorkQueueEfl.cpp: 17 (WorkQueue::dispatch): 18 (WorkQueue::dispatchAfter): 19 1 20 2014-01-18 Anders Carlsson <andersca@apple.com> 2 21 -
trunk/Source/WebKit2/Platform/efl/DispatchQueueEfl.cpp
r157289 r162300 171 171 } 172 172 173 double currentTimeSeconds = currentTime();173 double currentTimeSeconds = monotonicallyIncreasingTime(); 174 174 175 175 for (size_t i = 0; i < timerWorkItems.size(); ++i) { … … 242 242 timeValue.tv_sec = 0; 243 243 timeValue.tv_usec = 0; 244 double timeOut = m_timerWorkItems[0]->expirationTimeSeconds() - currentTime();244 double timeOut = m_timerWorkItems[0]->expirationTimeSeconds() - monotonicallyIncreasingTime(); 245 245 if (timeOut > 0) { 246 246 timeValue.tv_sec = static_cast<long>(timeOut); -
trunk/Source/WebKit2/Platform/efl/DispatchQueueWorkItemEfl.h
r157289 r162300 35 35 class WorkItem { 36 36 public: 37 static std::unique_ptr<WorkItem> create(PassRefPtr<WorkQueue> workQueue, const Function<void()>&function)37 static std::unique_ptr<WorkItem> create(PassRefPtr<WorkQueue> workQueue, std::function<void ()> function) 38 38 { 39 return std::unique_ptr<WorkItem>(new WorkItem(workQueue, function));39 return std::unique_ptr<WorkItem>(new WorkItem(workQueue, std::move(function))); 40 40 } 41 41 void dispatch() { m_function(); } 42 42 43 43 protected: 44 WorkItem(PassRefPtr<WorkQueue> workQueue, const Function<void()>&function)44 WorkItem(PassRefPtr<WorkQueue> workQueue, std::function<void ()> function) 45 45 : m_workQueue(workQueue) 46 , m_function( function)46 , m_function(std::move(function)) 47 47 { 48 48 } … … 50 50 private: 51 51 RefPtr<WorkQueue> m_workQueue; 52 Function<void()> m_function;52 std::function<void ()> m_function; 53 53 }; 54 54 55 55 class TimerWorkItem : public WorkItem { 56 56 public: 57 static std::unique_ptr<TimerWorkItem> create(PassRefPtr<WorkQueue> workQueue, const Function<void()>& function, double delaySeconds)57 static std::unique_ptr<TimerWorkItem> create(PassRefPtr<WorkQueue> workQueue, std::function<void ()> function, std::chrono::nanoseconds delay) 58 58 { 59 59 ASSERT(delaySeconds >= 0); 60 return std::unique_ptr<TimerWorkItem>(new TimerWorkItem(workQueue, function, currentTime() + delaySeconds));60 return std::unique_ptr<TimerWorkItem>(new TimerWorkItem(workQueue, std::move(function), monotonicallyIncreasingTime() + delay.count() / 1000000000ULL)); 61 61 } 62 62 double expirationTimeSeconds() const { return m_expirationTimeSeconds; } … … 64 64 65 65 protected: 66 TimerWorkItem(PassRefPtr<WorkQueue> workQueue, const Function<void()>&function, double expirationTimeSeconds)67 : WorkItem(workQueue, function)66 TimerWorkItem(PassRefPtr<WorkQueue> workQueue, std::function<void ()> function, double expirationTimeSeconds) 67 : WorkItem(workQueue, std::move(function)) 68 68 , m_expirationTimeSeconds(expirationTimeSeconds) 69 69 { -
trunk/Source/WebKit2/Platform/efl/WorkQueueEfl.cpp
r157289 r162300 53 53 } 54 54 55 void WorkQueue::dispatch( const Function<void()>&function)55 void WorkQueue::dispatch(std::function<void ()> function) 56 56 { 57 57 if (!m_dispatchQueue) 58 58 return; 59 59 60 m_dispatchQueue->dispatch(WorkItem::create(this, function));60 m_dispatchQueue->dispatch(WorkItem::create(this, std::move(function))); 61 61 } 62 62 63 void WorkQueue::dispatchAfter Delay(const Function<void()>& function, double delay)63 void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, std::function<void ()> function) 64 64 { 65 65 if (!m_dispatchQueue) 66 66 return; 67 67 68 m_dispatchQueue->dispatch(TimerWorkItem::create(this, function, delay));68 m_dispatchQueue->dispatch(TimerWorkItem::create(this, std::move(function), duration)); 69 69 }
Note: See TracChangeset
for help on using the changeset viewer.