forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcppgc.h
25 lines (18 loc) · 856 Bytes
/
cppgc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef GIN_PUBLIC_CPPGC_H_
#define GIN_PUBLIC_CPPGC_H_
#include "gin/gin_export.h"
namespace gin {
// A wrapper around `cppgc::InitializeProcess()` which helps to guarantee that
// cppgc is initialized only once when there are multiple users of cppgc in same
// process.
GIN_EXPORT void InitializeCppgcFromV8Platform();
// Calls `cppgc::ShutdownProcess()` only after being called as many times as
// `InitializeCppgcFromV8Platform()`. Helps to guarantee that cppgc is shutdown
// only after all users in the same process are done using it. Number of calls
// cannot exceed that of `InitializeCppgcFromV8Platform()`.
GIN_EXPORT void MaybeShutdownCppgc();
} // namespace gin
#endif // GIN_PUBLIC_CPPGC_H_