v8  6.2.414(node9.11.2)
V8 is Google's open source JavaScript engine
libplatform.h
Go to the documentation of this file.
1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_LIBPLATFORM_LIBPLATFORM_H_
6 #define V8_LIBPLATFORM_LIBPLATFORM_H_
7 
10 #include "v8-platform.h" // NOLINT(build/include)
11 
12 namespace v8 {
13 namespace platform {
14 
17 
18 enum class MessageLoopBehavior : bool {
19  kDoNotWait = false,
20  kWaitForWork = true
21 };
22 
37  int thread_pool_size = 0,
38  IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled,
39  InProcessStackDumping in_process_stack_dumping =
41  v8::TracingController* tracing_controller = nullptr);
42 
52  v8::Platform* platform, v8::Isolate* isolate,
54 
56  v8::Isolate* isolate);
57 
66  v8::Isolate* isolate,
67  double idle_time_in_seconds);
68 
77  v8::Platform* platform,
78  v8::platform::tracing::TracingController* tracing_controller);
79 
80 } // namespace platform
81 } // namespace v8
82 
83 #endif // V8_LIBPLATFORM_LIBPLATFORM_H_
#define V8_PLATFORM_EXPORT
Definition: libplatform.h:12
V8_PLATFORM_EXPORT v8::Platform * CreateDefaultPlatform(int thread_pool_size=0, IdleTaskSupport idle_task_support=IdleTaskSupport::kDisabled, InProcessStackDumping in_process_stack_dumping=InProcessStackDumping::kEnabled, v8::TracingController *tracing_controller=nullptr)
V8_PLATFORM_EXPORT bool PumpMessageLoop(v8::Platform *platform, v8::Isolate *isolate, MessageLoopBehavior behavior=MessageLoopBehavior::kDoNotWait)
V8_PLATFORM_EXPORT void SetTracingController(v8::Platform *platform, v8::platform::tracing::TracingController *tracing_controller)
V8_PLATFORM_EXPORT void EnsureEventLoopInitialized(v8::Platform *platform, v8::Isolate *isolate)
V8_PLATFORM_EXPORT void RunIdleTasks(v8::Platform *platform, v8::Isolate *isolate, double idle_time_in_seconds)