v8
13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
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::IsLocked
static bool IsLocked(Isolate *isolate)
v8::Locker::Locker
Locker(const Locker &)=delete
v8::Locker::operator=
void operator=(const Locker &)=delete
v8::Locker::Locker
V8_INLINE Locker(Isolate *isolate)
Definition
v8-locker.h:114
v8::Locker::~Locker
~Locker()
v8::Unlocker::~Unlocker
~Unlocker()
v8::Unlocker::Unlocker
V8_INLINE Unlocker(Isolate *isolate)
Definition
v8-locker.h:99
v8::internal
Definition
v8-cppgc.h:29
v8
Definition
libplatform.h:15
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 Fri May 30 2025 01:56:44 for v8 by
1.13.2