| Index: Source/platform/ThreadTimers.cpp
|
| diff --git a/Source/platform/ThreadTimers.cpp b/Source/platform/ThreadTimers.cpp
|
| index fe7b273aedecd92b209ab2550235d9b5699d4fbf..3e62a0858631ec2af5ae3bcf6c5b7b729b1e91e4 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::shared()->shouldYieldForHighPriorityWork()))
|
| break;
|
| }
|
|
|
|
|