#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_TRACE_TRAITS_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_TRACE_TRAITS_H_
#include <tuple>
#include "base/notreached.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/member.h"
#include "third_party/blink/renderer/platform/heap/visitor.h"
#include "third_party/blink/renderer/platform/wtf/hash_table.h"
#include "third_party/blink/renderer/platform/wtf/key_value_pair.h"
#include "third_party/blink/renderer/platform/wtf/type_traits.h"
#include "v8/include/cppgc/trace-trait.h"
namespace blink {
template <typename T>
struct TraceIfNeeded { … };
template <WTF::WeakHandlingFlag weakness,
typename T,
typename Traits,
bool = WTF::IsTraceable<typename Traits::TraitType>::value &&
!WTF::IsWeak<typename Traits::TraitType>::value,
WTF::WeakHandlingFlag = WTF::kWeakHandlingTrait<T>>
struct TraceCollectionIfEnabled;
TraceCollectionIfEnabled<weakness, T, Traits, false, WTF::kNoWeakHandling>;
TraceCollectionIfEnabled<WTF::kNoWeakHandling, T, Traits, false, WTF::kWeakHandling>;
template <WTF::WeakHandlingFlag weakness,
typename T,
typename Traits,
bool,
WTF::WeakHandlingFlag>
struct TraceCollectionIfEnabled { … };
namespace internal {
template <typename _KeyType,
typename _ValueType,
typename _KeyTraits,
typename _ValueTraits,
bool = WTF::IsWeak<_ValueType>::value>
struct EphemeronKeyValuePair { … };
EphemeronKeyValuePair<_KeyType, _ValueType, _KeyTraits, _ValueTraits, true>;
template <WTF::WeakHandlingFlag WeakHandling,
typename Key,
typename Value,
typename Traits>
struct KeyValuePairInCollectionTrait { … };
}
}
namespace WTF {
TraceInCollectionTrait<kNoWeakHandling, KeyValuePair<Key, Value>, Traits>;
TraceInCollectionTrait<kWeakHandling, KeyValuePair<Key, Value>, Traits>;
TraceInCollectionTrait<kNoWeakHandling, T, Traits>;
TraceInCollectionTrait<kNoWeakHandling, blink::WeakMember<T>, Traits>;
TraceInCollectionTrait<kWeakHandling, T, Traits>;
TraceInCollectionTrait<kWeakHandling, blink::WeakMember<T>, Traits>;
}
namespace cppgc {
TraceTrait<std::pair<T, U>>;
}
#endif