Chromium Code Reviews| Index: Source/platform/ThreadTimers.cpp |
| diff --git a/Source/platform/ThreadTimers.cpp b/Source/platform/ThreadTimers.cpp |
| index fe7b273aedecd92b209ab2550235d9b5699d4fbf..a9faeea9b81417d79c0af07dcca85ceba40059bb 100644 |
| --- a/Source/platform/ThreadTimers.cpp |
| +++ b/Source/platform/ThreadTimers.cpp |
| @@ -27,10 +27,11 @@ |
| #include "config.h" |
| #include "platform/ThreadTimers.h" |
| -#include "platform/SharedTimer.h" |
| #include "platform/PlatformThreadData.h" |
| +#include "platform/SharedTimer.h" |
| #include "platform/Timer.h" |
| #include "platform/TraceEvent.h" |
| +#include "platform/scheduler/Scheduler.h" |
| #include "wtf/CurrentTime.h" |
| #include "wtf/MainThread.h" |
| @@ -138,7 +139,7 @@ void ThreadTimers::sharedTimerFiredInternal() |
| timer.fired(); |
| // Catch the case where the timer asked timers to fire in a nested event loop, or we are over time limit. |
| - if (!m_firingTimers || timeToQuit < monotonicallyIncreasingTime()) |
| + if (!m_firingTimers || timeToQuit < monotonicallyIncreasingTime() || (isMainThread() && Scheduler::current()->shouldYieldForHighPriorityWork())) |
|
eseidel
2014/07/15 15:59:11
Do we ever have a sharedTimer not on the main thre
Sami
2014/07/15 19:20:05
We don't have a shared timer there, but can have a
|
| break; |
| } |