v8  8.4.371 (node 14.15.5)
V8 is Google's open source JavaScript engine
platform.h
Go to the documentation of this file.
1 // Copyright 2020 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 INCLUDE_CPPGC_PLATFORM_H_
6 #define INCLUDE_CPPGC_PLATFORM_H_
7 
8 #include "v8-platform.h" // NOLINT(build/include_directory)
9 #include "v8config.h" // NOLINT(build/include_directory)
10 
11 namespace cppgc {
12 
13 // TODO(v8:10346): Put PageAllocator in a non-V8 include header to avoid
14 // depending on namespace v8.
15 using PageAllocator = v8::PageAllocator;
16 
17 // Initializes the garbage collector with the provided platform. Must be called
18 // before creating a Heap.
19 V8_EXPORT void InitializePlatform(PageAllocator* page_allocator);
20 
21 // Must be called after destroying the last used heap.
23 
24 namespace internal {
25 
27 
28 } // namespace internal
29 } // namespace cppgc
30 
31 #endif // INCLUDE_CPPGC_PLATFORM_H_