// Copyright 2020 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include #include "include/cppgc/allocation.h" #include "include/cppgc/cross-thread-persistent.h" #include "include/cppgc/garbage-collected.h" #include "include/cppgc/internal/persistent-node.h" #include "include/cppgc/internal/pointer-policies.h" #include "include/cppgc/member.h" #include "include/cppgc/persistent.h" #include "include/cppgc/source-location.h" #include "include/cppgc/type-traits.h" #include "src/base/logging.h" #include "src/base/platform/platform.h" #include "src/heap/cppgc/globals.h" #include "src/heap/cppgc/heap.h" #include "src/heap/cppgc/liveness-broker.h" #include "src/heap/cppgc/visitor.h" #include "test/unittests/heap/cppgc/tests.h" #include "testing/gtest/include/gtest/gtest.h" namespace cppgc { namespace internal { namespace { struct GCed : GarbageCollected { static size_t trace_call_count; virtual void Trace(cppgc::Visitor*) const { ++trace_call_count; } }; size_t GCed::trace_call_count = 0; struct DerivedGCed : GCed { void Trace(cppgc::Visitor* v) const override { GCed::Trace(v); } }; template