mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
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: https://github.com/v8/v8/commit/dab18fb0bbcdd PR-URL: https://github.com/nodejs/node/pull/12875 Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
62eaa2a186
commit
6d5ca4feb0
2 files changed
+6
-3
No files matched your search
+4
-1
@@ -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.
|
||||
|
||||
+2
-2
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user