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
9// Include the non-inl header before the rest of the headers.
10
12#include "src/objects/smi.h"
13
14namespace v8 {
15namespace 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 }
25#undef DEFINE_PROTECTORS_ON_ISOLATE_CHECK
26
27} // namespace internal
28} // namespace v8
29
30#endif // V8_EXECUTION_PROTECTORS_INL_H_
#define DEFINE_PROTECTOR_ON_ISOLATE_CHECK(name, root_index, unused_cell)
#define DECLARED_PROTECTORS_ON_ISOLATE(V)
Definition protectors.h:18