Chromium Code Reviews| Index: Source/platform/ThreadTimers.cpp |
| diff --git a/Source/platform/ThreadTimers.cpp b/Source/platform/ThreadTimers.cpp |
| index fe7b273aedecd92b209ab2550235d9b5699d4fbf..f88938d3765559bd45d4f18fc67d354dc832cda7 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() || Scheduler::current()->shouldYieldForHighPriorityWork()) |
|
Sami
2014/07/08 15:58:29
Note to self: isMainThread()
|
| break; |
| } |