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);
116 const WriteBarrierParams& params,
const void* first_element,
117 size_t element_size, size_t number_of_elements,
118 TraceCallback trace_callback) {
120 params
, first_element
, element_size
, number_of_elements
,
134 const void* object) {
160 const WriteBarrierParams& params,
const void* inner_pointer) {
166 HeapConsistency() =
delete;
192 static void Enter(HeapHandle& heap_handle);
200 static void Leave(HeapHandle& heap_handle);
214 const DisallowGarbageCollectionScope&) =
delete;
217 HeapHandle& heap_handle_;
237 static void Enter(HeapHandle& heap_handle);
245 static void Leave(HeapHandle& heap_handle);
257 NoGarbageCollectionScope&
operator=(
const NoGarbageCollectionScope&) =
delete;
260 HeapHandle& heap_handle_;