Skip to content

Commit

Permalink
v8: backport pieces of dab18fb0bbcdd
Browse files Browse the repository at this point in the history
Backport ABI-incompatible changes from
dab18fb0bbcdd (“Make idle tasks optional in the default platform.”).

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

PR-URL: #12875
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
addaleax authored and jasnell committed May 23, 2017
1 parent 496b1b5 commit 808d056
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion deps/v8/include/libplatform/libplatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
namespace v8 {
namespace platform {

enum class IdleTaskSupport { kDisabled, kEnabled };

/**
* Returns a new instance of the default v8::Platform implementation.
*
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions deps/v8/src/libplatform/default-platform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 808d056

Please sign in to comment.