Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: include/libplatform/libplatform.h

Issue 2737743002: Make idle tasks optional in the default platform. (Closed)
Patch Set: another fix Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/libplatform/libplatform.h
diff --git a/include/libplatform/libplatform.h b/include/libplatform/libplatform.h
index cab467fd50704f6ddc35dcae46e8f0a68e8b515e..55a10204ee2c11b805a0adbebb0ffa9e77523cc9 100644
--- a/include/libplatform/libplatform.h
+++ b/include/libplatform/libplatform.h
@@ -12,6 +12,8 @@
namespace v8 {
namespace platform {
+enum class IdleTaskSupport { kDisabled, kEnabled };
+
/**
* Returns a new instance of the default v8::Platform implementation.
*
@@ -19,9 +21,13 @@ namespace platform {
* is the number of worker threads to allocate for background jobs. If a value
* of zero is passed, a suitable default based on the current number of
* processors online will be chosen.
+ * If |idle_task_support| is enabled then the platform will accept idle
+ * tasks (IdleTasksEnabled will return true) and will rely on the embedder
+ * calling v8::platform::RunIdleTasks to process the idle tasks.
*/
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.
« no previous file with comments | « no previous file | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698