Index: include/libplatform/libplatform.h |
diff --git a/include/libplatform/libplatform.h b/include/libplatform/libplatform.h |
index cab467fd50704f6ddc35dcae46e8f0a68e8b515e..55a10204ee2c11b805a0adbebb0ffa9e77523cc9 100644 |
--- a/include/libplatform/libplatform.h |
+++ b/include/libplatform/libplatform.h |
@@ -12,6 +12,8 @@ |
namespace v8 { |
namespace platform { |
+enum class IdleTaskSupport { kDisabled, kEnabled }; |
+ |
/** |
* Returns a new instance of the default v8::Platform implementation. |
* |
@@ -19,9 +21,13 @@ namespace platform { |
* is the number of worker threads to allocate for background jobs. If a value |
* of zero is passed, a suitable default based on the current number of |
* processors online will be chosen. |
+ * If |idle_task_support| is enabled then the platform will accept idle |
+ * tasks (IdleTasksEnabled will return true) and will rely on the embedder |
+ * calling v8::platform::RunIdleTasks to process the idle tasks. |
*/ |
V8_PLATFORM_EXPORT v8::Platform* CreateDefaultPlatform( |
- int thread_pool_size = 0); |
+ int thread_pool_size = 0, |
+ IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled); |
/** |
* Pumps the message loop for the given isolate. |