Skip to content
Permalink
Browse files

v8: backport pieces of dab18fb0bbcdd

Backport ABI-incompatible changes from
dab18fb0bbcdd (“Make idle tasks optional in the default platform.”).

Ref: https://codereview.chromium.org/2737743002
Ref: v8/v8@dab18fb

PR-URL: #12875
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
addaleax authored and jasnell committed May 7, 2017
1 parent 62eaa2a commit 6d5ca4feb07da201857f1b7ecab2befd18750145
Showing with 6 additions and 3 deletions.
  1. +4 −1 deps/v8/include/libplatform/libplatform.h
  2. +2 −2 deps/v8/src/libplatform/default-platform.cc
@@ -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.
@@ -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();

0 comments on commit 6d5ca4f

Please sign in to comment.
You can’t perform that action at this time.