OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 private: | 954 private: |
955 | 955 |
956 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \ | 956 #define DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(type) \ |
957 type::~type() { } | 957 type::~type() { } |
958 | 958 |
959 #define DEFINE_STATIC_REF_WILL_BE_PERSISTENT(type, name, arguments) \ | 959 #define DEFINE_STATIC_REF_WILL_BE_PERSISTENT(type, name, arguments) \ |
960 DEFINE_STATIC_REF(type, name, arguments) | 960 DEFINE_STATIC_REF(type, name, arguments) |
961 | 961 |
962 #endif // ENABLE(OILPAN) | 962 #endif // ENABLE(OILPAN) |
963 | 963 |
| 964 template<typename T> |
| 965 class TraceEagerlyTrait<Member<T>> { |
| 966 public: |
| 967 static const bool value = TraceEagerlyTrait<T>::value; |
| 968 }; |
| 969 |
| 970 template<typename T> |
| 971 class TraceEagerlyTrait<WeakMember<T>> { |
| 972 public: |
| 973 static const bool value = TraceEagerlyTrait<T>::value; |
| 974 }; |
| 975 |
| 976 template<typename T> |
| 977 class TraceEagerlyTrait<Persistent<T>> { |
| 978 public: |
| 979 static const bool value = TraceEagerlyTrait<T>::value; |
| 980 }; |
| 981 |
| 982 template<typename T> |
| 983 class TraceEagerlyTrait<CrossThreadPersistent<T>> { |
| 984 public: |
| 985 static const bool value = TraceEagerlyTrait<T>::value; |
| 986 }; |
| 987 |
| 988 template<typename T, typename U, typename V, typename W, typename X> |
| 989 class TraceEagerlyTrait<HeapHashMap<T, U, V, W, X> > { |
| 990 public: |
| 991 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T) || IS_EAGERLY
_TRACED_HEAP_COLLECTION(U); |
| 992 }; |
| 993 |
| 994 template<typename T, typename U, typename V> |
| 995 class TraceEagerlyTrait<HeapHashSet<T, U, V> > { |
| 996 public: |
| 997 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); |
| 998 }; |
| 999 |
| 1000 template<typename T, typename U, typename V> |
| 1001 class TraceEagerlyTrait<HeapLinkedHashSet<T, U, V> > { |
| 1002 public: |
| 1003 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); |
| 1004 }; |
| 1005 |
| 1006 template<typename T, size_t inlineCapacity, typename U> |
| 1007 class TraceEagerlyTrait<HeapListHashSet<T, inlineCapacity, U> > { |
| 1008 public: |
| 1009 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); |
| 1010 }; |
| 1011 |
| 1012 template<typename T, size_t inlineCapacity> |
| 1013 class TraceEagerlyTrait<HeapVector<T, inlineCapacity> > { |
| 1014 public: |
| 1015 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); |
| 1016 }; |
| 1017 |
| 1018 template<typename T, typename U> |
| 1019 class TraceEagerlyTrait<HeapVectorBacking<T, U> > { |
| 1020 public: |
| 1021 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); |
| 1022 }; |
| 1023 |
| 1024 template<typename T, size_t inlineCapacity> |
| 1025 class TraceEagerlyTrait<HeapDeque<T, inlineCapacity> > { |
| 1026 public: |
| 1027 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); |
| 1028 }; |
| 1029 |
| 1030 template<typename T, typename U, typename V> |
| 1031 class TraceEagerlyTrait<HeapHashCountedSet<T, U, V> > { |
| 1032 public: |
| 1033 static const bool value = IS_EAGERLY_TRACED_HEAP_COLLECTION(T); |
| 1034 }; |
| 1035 |
964 } // namespace blink | 1036 } // namespace blink |
965 | 1037 |
966 namespace WTF { | 1038 namespace WTF { |
967 | 1039 |
968 template <typename T> struct VectorTraits<blink::Member<T> > : VectorTraitsBase<
blink::Member<T> > { | 1040 template <typename T> struct VectorTraits<blink::Member<T> > : VectorTraitsBase<
blink::Member<T> > { |
969 static const bool needsDestruction = false; | 1041 static const bool needsDestruction = false; |
970 static const bool canInitializeWithMemset = true; | 1042 static const bool canInitializeWithMemset = true; |
971 static const bool canMoveWithMemcpy = true; | 1043 static const bool canMoveWithMemcpy = true; |
972 }; | 1044 }; |
973 | 1045 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 template<typename T> | 1223 template<typename T> |
1152 struct ParamStorageTraits<RawPtr<T> > : public PointerParamStorageTraits<T*, bli
nk::IsGarbageCollectedType<T>::value> { | 1224 struct ParamStorageTraits<RawPtr<T> > : public PointerParamStorageTraits<T*, bli
nk::IsGarbageCollectedType<T>::value> { |
1153 }; | 1225 }; |
1154 | 1226 |
1155 template<typename T> | 1227 template<typename T> |
1156 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; | 1228 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
1157 | 1229 |
1158 } // namespace WTF | 1230 } // namespace WTF |
1159 | 1231 |
1160 #endif | 1232 #endif |
OLD | NEW |