From 6d5ca4feb07da201857f1b7ecab2befd18750145 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 7 May 2017 19:15:58 +0200 Subject: [PATCH] v8: backport pieces of dab18fb0bbcdd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport ABI-incompatible changes from dab18fb0bbcdd (“Make idle tasks optional in the default platform.”). Ref: https://codereview.chromium.org/2737743002 Ref: https://github.com/v8/v8/commit/dab18fb0bbcdd PR-URL: https://github.com/nodejs/node/pull/12875 Reviewed-By: James M Snell --- deps/v8/include/libplatform/libplatform.h | 5 ++++- deps/v8/src/libplatform/default-platform.cc | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/deps/v8/include/libplatform/libplatform.h b/deps/v8/include/libplatform/libplatform.h index cab467fd507..26baaa08667 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 0e2144b6484..14e12d1f90e 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();