v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8-locker.h
Go to the documentation of this file.
1
// Copyright 2021 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_V8_LOCKER_H_
6
#define INCLUDE_V8_LOCKER_H_
7
8
#include "
v8config.h
"
// NOLINT(build/include_directory)
9
10
namespace
v8
{
11
12
namespace
internal
{
13
class
Isolate;
14
}
// namespace internal
15
16
class
Isolate;
17
94
class
V8_EXPORT
Unlocker
{
95
public
:
99
V8_INLINE
explicit
Unlocker
(
Isolate
* isolate) { Initialize(isolate); }
100
101
~Unlocker
();
102
103
private
:
104
void
Initialize(
Isolate
* isolate);
105
106
internal::Isolate
*
isolate_
;
107
};
108
109
class
V8_EXPORT
Locker
{
110
public
:
114
V8_INLINE
explicit
Locker
(
Isolate
* isolate) { Initialize(isolate); }
115
116
~Locker
();
117
122
static
bool
IsLocked(
Isolate
* isolate);
123
124
// Disallow copying and assigning.
125
Locker
(
const
Locker
&) =
delete
;
126
void
operator=
(
const
Locker
&) =
delete
;
127
128
private
:
129
void
Initialize(
Isolate
* isolate);
130
131
bool
has_lock_
;
132
bool
top_level_
;
133
internal::Isolate
*
isolate_
;
134
};
135
136
}
// namespace v8
137
138
#endif
// INCLUDE_V8_LOCKER_H_
v8::Isolate
Definition
v8-isolate.h:274
v8::Locker
Definition
v8-locker.h:109
v8::Locker::top_level_
bool top_level_
Definition
v8-locker.h:132
v8::Locker::has_lock_
bool has_lock_
Definition
v8-locker.h:131
v8::Locker::Locker
V8_INLINE Locker(Isolate *isolate)
Definition
v8-locker.h:114
v8::Locker::Locker
Locker(const Locker &)=delete
v8::Locker::isolate_
internal::Isolate * isolate_
Definition
v8-locker.h:133
v8::Locker::operator=
void operator=(const Locker &)=delete
v8::Unlocker
Definition
v8-locker.h:94
v8::Unlocker::isolate_
internal::Isolate * isolate_
Definition
v8-locker.h:106
v8::Unlocker::Unlocker
V8_INLINE Unlocker(Isolate *isolate)
Definition
v8-locker.h:99
v8::internal::Isolate
Definition
isolate.h:586
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
v8config.h
V8_EXPORT
#define V8_EXPORT
Definition
v8config.h:800
V8_INLINE
#define V8_INLINE
Definition
v8config.h:500
include
v8-locker.h
Generated on Sun Apr 6 2025 21:08:50 for v8 by
1.12.0