v8  7.9.317(node13.2.0)
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 
8 #include <memory>
9 
11 #include "libplatform/v8-tracing.h"
12 #include "v8-platform.h" // NOLINT(build/include)
13 #include "v8config.h" // NOLINT(build/include)
14 
15 namespace v8 {
16 namespace platform {
17 
20 
21 enum class MessageLoopBehavior : bool {
22  kDoNotWait = false,
23  kWaitForWork = true
24 };
25 
39 V8_PLATFORM_EXPORT std::unique_ptr<v8::Platform> NewDefaultPlatform(
40  int thread_pool_size = 0,
41  IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled,
42  InProcessStackDumping in_process_stack_dumping =
44  std::unique_ptr<v8::TracingController> tracing_controller = {});
45 
55  v8::Platform* platform, v8::Isolate* isolate,
57 
66  v8::Isolate* isolate,
67  double idle_time_in_seconds);
68 
75 V8_DEPRECATE_SOON("Access the DefaultPlatform directly")
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_
V8_DEPRECATE_SOON
#define V8_DEPRECATE_SOON(message)
Definition: v8config.h:401
v8::platform::MessageLoopBehavior
MessageLoopBehavior
Definition: libplatform.h:21
v8::platform::MessageLoopBehavior::kDoNotWait
v8::platform::IdleTaskSupport
IdleTaskSupport
Definition: libplatform.h:18
v8::platform::PumpMessageLoop
V8_PLATFORM_EXPORT bool PumpMessageLoop(v8::Platform *platform, v8::Isolate *isolate, MessageLoopBehavior behavior=MessageLoopBehavior::kDoNotWait)
v8config.h
v8::Isolate
Definition: v8.h:7773
v8::platform::SetTracingController
V8_PLATFORM_EXPORT void SetTracingController(v8::Platform *platform, v8::platform::tracing::TracingController *tracing_controller)
v8
Definition: libplatform.h:15
v8-platform.h
v8::platform::RunIdleTasks
V8_PLATFORM_EXPORT void RunIdleTasks(v8::Platform *platform, v8::Isolate *isolate, double idle_time_in_seconds)
v8::Platform
Definition: v8-platform.h:283
V8_PLATFORM_EXPORT
#define V8_PLATFORM_EXPORT
Definition: libplatform-export.h:24
v8::platform::IdleTaskSupport::kEnabled
libplatform-export.h
v8::platform::IdleTaskSupport::kDisabled
v8-tracing.h
v8::platform::InProcessStackDumping
InProcessStackDumping
Definition: libplatform.h:19
v8::platform::MessageLoopBehavior::kWaitForWork
v8::platform::NewDefaultPlatform
V8_PLATFORM_EXPORT std::unique_ptr< v8::Platform > NewDefaultPlatform(int thread_pool_size=0, IdleTaskSupport idle_task_support=IdleTaskSupport::kDisabled, InProcessStackDumping in_process_stack_dumping=InProcessStackDumping::kDisabled, std::unique_ptr< v8::TracingController > tracing_controller={})