v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
protectors-inl.h
Go to the documentation of this file.
1
// Copyright 2019 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_EXECUTION_PROTECTORS_INL_H_
6
#define V8_EXECUTION_PROTECTORS_INL_H_
7
8
#include "
src/execution/protectors.h
"
9
// Include the non-inl header before the rest of the headers.
10
11
#include "
src/objects/property-cell-inl.h
"
12
#include "
src/objects/smi.h
"
13
14
namespace
v8
{
15
namespace
internal
{
16
17
#define DEFINE_PROTECTOR_ON_ISOLATE_CHECK(name, root_index, unused_cell) \
18
bool Protectors::Is##name##Intact(Isolate* isolate) { \
19
Tagged<PropertyCell> cell = \
20
Cast<PropertyCell>(isolate->root(RootIndex::k##root_index)); \
21
return IsSmi(cell->value()) && \
22
Smi::ToInt(cell->value()) == kProtectorValid; \
23
}
24
DECLARED_PROTECTORS_ON_ISOLATE
(
DEFINE_PROTECTOR_ON_ISOLATE_CHECK
)
25
#undef DEFINE_PROTECTORS_ON_ISOLATE_CHECK
26
27
}
// namespace internal
28
}
// namespace v8
29
30
#endif
// V8_EXECUTION_PROTECTORS_INL_H_
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
property-cell-inl.h
DEFINE_PROTECTOR_ON_ISOLATE_CHECK
#define DEFINE_PROTECTOR_ON_ISOLATE_CHECK(name, root_index, unused_cell)
Definition
protectors-inl.h:17
protectors.h
DECLARED_PROTECTORS_ON_ISOLATE
#define DECLARED_PROTECTORS_ON_ISOLATE(V)
Definition
protectors.h:18
smi.h
src
execution
protectors-inl.h
Generated on Sun Apr 6 2025 21:08:53 for v8 by
1.12.0