5 #ifndef V8_LIBPLATFORM_LIBPLATFORM_H_ 6 #define V8_LIBPLATFORM_LIBPLATFORM_H_ 8 #include "libplatform/libplatform-export.h" 9 #include "libplatform/v8-tracing.h" 10 #include "v8-platform.h" 16 enum class IdleTaskSupport { kDisabled, kEnabled };
17 enum class InProcessStackDumping { kDisabled, kEnabled };
19 enum class MessageLoopBehavior :
bool {
37 V8_PLATFORM_EXPORT std::unique_ptr<v8::Platform> NewDefaultPlatform(
38 int thread_pool_size = 0,
39 IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled,
40 InProcessStackDumping in_process_stack_dumping =
41 InProcessStackDumping::kDisabled,
42 std::unique_ptr<v8::TracingController> tracing_controller = {});
44 V8_PLATFORM_EXPORT V8_DEPRECATE_SOON(
45 "Use NewDefaultPlatform instead",
47 int thread_pool_size = 0,
48 IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled,
49 InProcessStackDumping in_process_stack_dumping =
50 InProcessStackDumping::kDisabled,
61 V8_PLATFORM_EXPORT
bool PumpMessageLoop(
63 MessageLoopBehavior behavior = MessageLoopBehavior::kDoNotWait);
72 V8_PLATFORM_EXPORT
void RunIdleTasks(
v8::Platform* platform,
74 double idle_time_in_seconds);
82 V8_PLATFORM_EXPORT V8_DEPRECATE_SOON(
83 "Access the DefaultPlatform directly",
84 void SetTracingController(
91 #endif // V8_LIBPLATFORM_LIBPLATFORM_H_