diff --git a/deps/v8/include/libplatform/libplatform.h b/deps/v8/include/libplatform/libplatform.h index cab467fd50704f..26baaa08667b4d 100644 --- a/deps/v8/include/libplatform/libplatform.h +++ b/deps/v8/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. * @@ -21,7 +23,8 @@ namespace platform { * processors online will be chosen. */ 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. diff --git a/deps/v8/src/libplatform/default-platform.cc b/deps/v8/src/libplatform/default-platform.cc index 0e2144b64844d9..14e12d1f90e974 100644 --- a/deps/v8/src/libplatform/default-platform.cc +++ b/deps/v8/src/libplatform/default-platform.cc @@ -17,8 +17,8 @@ namespace v8 { namespace platform { - -v8::Platform* CreateDefaultPlatform(int thread_pool_size) { +v8::Platform* CreateDefaultPlatform(int thread_pool_size, + IdleTaskSupport idle_task_support) { DefaultPlatform* platform = new DefaultPlatform(); platform->SetThreadPoolSize(thread_pool_size); platform->EnsureInitialized();