v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
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
12#include "v8-platform.h" // NOLINT(build/include_directory)
13#include "v8config.h" // NOLINT(build/include_directory)
14
15namespace v8 {
16namespace platform {
17
20
21enum class MessageLoopBehavior : bool {
22 kDoNotWait = false,
23 kWaitForWork = true
24};
25
26enum class PriorityMode : bool { kDontApply, kApply };
27
44V8_PLATFORM_EXPORT std::unique_ptr<v8::Platform> NewDefaultPlatform(
45 int thread_pool_size = 0,
47 InProcessStackDumping in_process_stack_dumping =
49 std::unique_ptr<v8::TracingController> tracing_controller = {},
51
56V8_PLATFORM_EXPORT std::unique_ptr<v8::Platform>
59 InProcessStackDumping in_process_stack_dumping =
61 std::unique_ptr<v8::TracingController> tracing_controller = {});
62
69V8_PLATFORM_EXPORT std::unique_ptr<v8::JobHandle> NewDefaultJobHandle(
71 std::unique_ptr<v8::JobTask> job_task, size_t num_worker_threads);
72
84 v8::Platform* platform, v8::Isolate* isolate,
86
95 v8::Isolate* isolate,
96 double idle_time_in_seconds);
97
107 Isolate* isolate);
108
109} // namespace platform
110} // namespace v8
111
112#endif // V8_LIBPLATFORM_LIBPLATFORM_H_
#define V8_PLATFORM_EXPORT
size_t priority
std::unique_ptr< v8::Platform > NewSingleThreadedDefaultPlatform(IdleTaskSupport idle_task_support, InProcessStackDumping in_process_stack_dumping, std::unique_ptr< v8::TracingController > tracing_controller)
void RunIdleTasks(v8::Platform *platform, v8::Isolate *isolate, double idle_time_in_seconds)
V8_PLATFORM_EXPORT std::unique_ptr< JobHandle > NewDefaultJobHandle(Platform *platform, TaskPriority priority, std::unique_ptr< JobTask > job_task, size_t num_worker_threads)
void NotifyIsolateShutdown(v8::Platform *platform, Isolate *isolate)
std::unique_ptr< v8::Platform > NewDefaultPlatform(int thread_pool_size, IdleTaskSupport idle_task_support, InProcessStackDumping in_process_stack_dumping, std::unique_ptr< v8::TracingController > tracing_controller, PriorityMode priority_mode)
bool PumpMessageLoop(v8::Platform *platform, v8::Isolate *isolate, MessageLoopBehavior behavior)
TaskPriority
Definition v8-platform.h:24