Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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@dab18fb0bbcdd
  • Loading branch information
addaleax committed May 7, 2017
commit ecf7ea53112d5dce8144f787ff71224e9665991f
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