5 #ifndef INCLUDE_CPPGC_HEAP_CONSISTENCY_H_
6 #define INCLUDE_CPPGC_HEAP_CONSISTENCY_H_
10 #include "cppgc/internal/write-barrier.h"
11 #include "cppgc/macros.h"
12 #include "cppgc/trace-trait.h"
27 class HeapConsistency
final {
46 const void* slot,
const void* value, WriteBarrierParams& params) {
64 template <
typename HeapHandleCallback>
67 HeapHandleCallback callback) {
68 return internal::WriteBarrier::GetWriteBarrierType(slot, params, callback);
99 const WriteBarrierParams& params,
const void* first_element,
100 size_t element_size, size_t number_of_elements,
101 TraceCallback trace_callback) {
103 params
, first_element
, element_size
, number_of_elements
,
117 const void* object) {
136 HeapConsistency() =
delete;
162 static void Enter(HeapHandle& heap_handle);
170 static void Leave(HeapHandle& heap_handle);
183 DisallowGarbageCollectionScope&
operator=(
184 const DisallowGarbageCollectionScope&) =
delete;
187 HeapHandle& heap_handle_;
207 static void Enter(HeapHandle& heap_handle);
215 static void Leave(HeapHandle& heap_handle);
227 NoGarbageCollectionScope&
operator=(
const NoGarbageCollectionScope&) =
delete;
230 HeapHandle& heap_handle_;