| 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 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1132 }; | 1132 }; |
| 1133 | 1133 |
| 1134 template<typename T> struct DefaultHash<blink::WeakMember<T>> { | 1134 template<typename T> struct DefaultHash<blink::WeakMember<T>> { |
| 1135 using Hash = PtrHash<blink::WeakMember<T>>; | 1135 using Hash = PtrHash<blink::WeakMember<T>>; |
| 1136 }; | 1136 }; |
| 1137 | 1137 |
| 1138 template<typename T> struct DefaultHash<blink::Persistent<T>> { | 1138 template<typename T> struct DefaultHash<blink::Persistent<T>> { |
| 1139 using Hash = PtrHash<blink::Persistent<T>>; | 1139 using Hash = PtrHash<blink::Persistent<T>>; |
| 1140 }; | 1140 }; |
| 1141 | 1141 |
| 1142 template<typename T> | |
| 1143 struct NeedsTracing<blink::Member<T>> { | |
| 1144 static const bool value = true; | |
| 1145 }; | |
| 1146 | |
| 1147 template<typename T> | |
| 1148 struct IsWeak<blink::WeakMember<T>> { | |
| 1149 static const bool value = true; | |
| 1150 }; | |
| 1151 | |
| 1152 template<typename T> inline T* getPtr(const blink::Member<T>& p) | 1142 template<typename T> inline T* getPtr(const blink::Member<T>& p) |
| 1153 { | 1143 { |
| 1154 return p.get(); | 1144 return p.get(); |
| 1155 } | 1145 } |
| 1156 | 1146 |
| 1157 template<typename T> inline T* getPtr(const blink::Persistent<T>& p) | 1147 template<typename T> inline T* getPtr(const blink::Persistent<T>& p) |
| 1158 { | 1148 { |
| 1159 return p.get(); | 1149 return p.get(); |
| 1160 } | 1150 } |
| 1161 | 1151 |
| 1162 template<typename T, size_t inlineCapacity> | |
| 1163 struct NeedsTracing<ListHashSetNode<T, blink::HeapListHashSetAllocator<T, inline
Capacity>> *> { | |
| 1164 // All heap allocated node pointers need visiting to keep the nodes alive, | |
| 1165 // regardless of whether they contain pointers to other heap allocated | |
| 1166 // objects. | |
| 1167 static const bool value = true; | |
| 1168 }; | |
| 1169 | |
| 1170 // For wtf/Functional.h | 1152 // For wtf/Functional.h |
| 1171 template<typename T, bool isGarbageCollected> struct PointerParamStorageTraits; | 1153 template<typename T, bool isGarbageCollected> struct PointerParamStorageTraits; |
| 1172 | 1154 |
| 1173 template<typename T> | 1155 template<typename T> |
| 1174 struct PointerParamStorageTraits<T*, false> { | 1156 struct PointerParamStorageTraits<T*, false> { |
| 1175 using StorageType = T*; | 1157 using StorageType = T*; |
| 1176 | 1158 |
| 1177 static StorageType wrap(T* value) { return value; } | 1159 static StorageType wrap(T* value) { return value; } |
| 1178 static T* unwrap(const StorageType& value) { return value; } | 1160 static T* unwrap(const StorageType& value) { return value; } |
| 1179 }; | 1161 }; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1193 template<typename T> | 1175 template<typename T> |
| 1194 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { | 1176 struct ParamStorageTraits<RawPtr<T>> : public PointerParamStorageTraits<T*, blin
k::IsGarbageCollectedType<T>::value> { |
| 1195 }; | 1177 }; |
| 1196 | 1178 |
| 1197 template<typename T> | 1179 template<typename T> |
| 1198 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; | 1180 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
| 1199 | 1181 |
| 1200 } // namespace WTF | 1182 } // namespace WTF |
| 1201 | 1183 |
| 1202 #endif | 1184 #endif |
| OLD | NEW |