v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
testing.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_CPPGC_TESTING_H_
6
#define INCLUDE_CPPGC_TESTING_H_
7
8
#include "
cppgc/common.h
"
9
#include "
cppgc/macros.h
"
10
#include "
v8config.h
"
// NOLINT(build/include_directory)
11
12
namespace
cppgc
{
13
14
class
HeapHandle;
15
19
namespace
testing {
20
30
class
V8_EXPORT
V8_NODISCARD
OverrideEmbedderStackStateScope
final {
31
CPPGC_STACK_ALLOCATED
();
32
33
public
:
39
explicit
OverrideEmbedderStackStateScope
(
HeapHandle
& heap_handle,
40
EmbedderStackState
state);
41
~OverrideEmbedderStackStateScope
();
42
43
OverrideEmbedderStackStateScope
(
const
OverrideEmbedderStackStateScope
&) =
44
delete
;
45
OverrideEmbedderStackStateScope
&
operator=
(
46
const
OverrideEmbedderStackStateScope
&) =
delete
;
47
48
private
:
49
HeapHandle
&
heap_handle_
;
50
};
51
57
class
V8_EXPORT
StandaloneTestingHeap
final {
58
public
:
59
explicit
StandaloneTestingHeap
(
HeapHandle
&);
60
64
void
StartGarbageCollection();
65
72
bool
PerformMarkingStep(
EmbedderStackState
stack_state);
73
81
void
FinalizeGarbageCollection(
EmbedderStackState
stack_state);
82
90
void
ToggleMainThreadMarking(
bool
should_mark);
91
95
void
ForceCompactionForNextGarbageCollection();
96
97
private
:
98
HeapHandle
&
heap_handle_
;
99
};
100
101
V8_EXPORT
bool
IsHeapObjectOld
(
void
*);
102
103
}
// namespace testing
104
}
// namespace cppgc
105
106
#endif
// INCLUDE_CPPGC_TESTING_H_
cppgc::HeapHandle
Definition
heap-handle.h:21
cppgc::testing::OverrideEmbedderStackStateScope
Definition
testing.h:30
cppgc::testing::OverrideEmbedderStackStateScope::OverrideEmbedderStackStateScope
OverrideEmbedderStackStateScope(const OverrideEmbedderStackStateScope &)=delete
cppgc::testing::OverrideEmbedderStackStateScope::heap_handle_
HeapHandle & heap_handle_
Definition
testing.h:49
cppgc::testing::OverrideEmbedderStackStateScope::CPPGC_STACK_ALLOCATED
CPPGC_STACK_ALLOCATED()
cppgc::testing::OverrideEmbedderStackStateScope::operator=
OverrideEmbedderStackStateScope & operator=(const OverrideEmbedderStackStateScope &)=delete
cppgc::testing::StandaloneTestingHeap
Definition
testing.h:57
cppgc::testing::StandaloneTestingHeap::heap_handle_
HeapHandle & heap_handle_
Definition
testing.h:98
common.h
macros.h
cppgc::testing::IsHeapObjectOld
bool IsHeapObjectOld(void *object)
Definition
testing.cc:55
cppgc
Definition
cross-heap-remembered-set.h:14
cppgc::EmbedderStackState
EmbedderStackState
Definition
common.h:15
v8config.h
V8_EXPORT
#define V8_EXPORT
Definition
v8config.h:800
V8_NODISCARD
#define V8_NODISCARD
Definition
v8config.h:693
include
cppgc
testing.h
Generated on Sun Apr 6 2025 21:08:57 for v8 by
1.12.0