Skip to content

Commit 6d5ca4f

Browse files
addaleaxjasnell
authored andcommitted
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 PR-URL: #12875 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 62eaa2a commit 6d5ca4f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

deps/v8/include/libplatform/libplatform.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
namespace v8 {
1313
namespace platform {
1414

15+
enum class IdleTaskSupport { kDisabled, kEnabled };
16+
1517
/**
1618
* Returns a new instance of the default v8::Platform implementation.
1719
*
@@ -21,7 +23,8 @@ namespace platform {
2123
* processors online will be chosen.
2224
*/
2325
V8_PLATFORM_EXPORT v8::Platform* CreateDefaultPlatform(
24-
int thread_pool_size = 0);
26+
int thread_pool_size = 0,
27+
IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled);
2528

2629
/**
2730
* Pumps the message loop for the given isolate.

deps/v8/src/libplatform/default-platform.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
namespace v8 {
1818
namespace platform {
1919

20-
21-
v8::Platform* CreateDefaultPlatform(int thread_pool_size) {
20+
v8::Platform* CreateDefaultPlatform(int thread_pool_size,
21+
IdleTaskSupport idle_task_support) {
2222
DefaultPlatform* platform = new DefaultPlatform();
2323
platform->SetThreadPoolSize(thread_pool_size);
2424
platform->EnsureInitialized();

0 commit comments

Comments
 (0)