Index: public/platform/WebScheduler.h |
diff --git a/public/platform/WebScheduler.h b/public/platform/WebScheduler.h |
index a2cda3eac91603b1f741794377d01c942d88d16e..85d6778e49e855550f307ffd25a27a95dc862e30 100644 |
--- a/public/platform/WebScheduler.h |
+++ b/public/platform/WebScheduler.h |
@@ -35,6 +35,16 @@ public: |
// Must be called on the main thread. |
virtual bool shouldYieldForHighPriorityWork() { return false; } |
+ // Returns true if a currently running idle task could exceed its deadline |
+ // without impacting user experience too much. This should only be used if |
+ // there is a task which cannot be pre-empted and is likely to take longer |
+ // than the largest expected idle task deadline. It should NOT be polled to |
+ // check whether more work can be performed on the current idle task after |
+ // its deadline has expired - post a new idle task for the continuation of |
+ // the work in this case. |
+ // Must be called from the main thread. |
+ virtual bool canExceedIdleDeadlineIfRequired() { return false; } |
+ |
// Schedule an idle task to run the Blink main thread. For non-critical |
// tasks which may be reordered relative to other task types and may be |
// starved for an arbitrarily long time if no idle time is available. |