5 #ifndef INCLUDE_V8_CPPGC_H_
6 #define INCLUDE_V8_CPPGC_H_
12 #include "cppgc/common.h"
13 #include "cppgc/custom-space.h"
14 #include "cppgc/heap-statistics.h"
15 #include "cppgc/internal/write-barrier.h"
16 #include "cppgc/visitor.h"
21 class AllocationHandle;
37 struct WrapperDescriptor
final {
43 using InternalFieldIndex =
int;
52 InternalFieldIndex wrappable_instance_index,
53 uint16_t embedder_id_for_garbage_collected)
194 template <
typename HeapHandleCallback>
197 WriteBarrierParams& params, HeapHandleCallback callback) {
204 cppgc::HeapHandle& handle = callback();
208 params
.heap = &handle;
210 params.type = cppgc::internal::WriteBarrier::Type::kMarking;
232 template <
typename HeapHandleCallback>
234 v8::
Local<
v8::
Object>& wrapper,
int wrapper_index,
const void* wrappable,
235 WriteBarrierParams& params, HeapHandleCallback callback) {
237 CheckWrapper(wrapper, wrapper_index, wrappable);
240 GetWriteBarrierTypeForExternallyReferencedObject(wrappable, params,
252 cppgc::HeapHandle& heap_handle,
256 DijkstraMarkingBarrierSlow(heap_handle, ref);
268 cppgc::HeapHandle& heap_handle,
269 const void* object) {
284 JSHeapConsistency() =
delete;
288 static void DijkstraMarkingBarrierSlow(
cppgc::HeapHandle&,
316 template <
typename T>