Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: tools/clang/blink_gc_plugin/tests/heap/stubs.h

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/clang/blink_gc_plugin/Config.h ('k') | tools/clang/scripts/update.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef HEAP_STUBS_H_ 5 #ifndef HEAP_STUBS_H_
6 #define HEAP_STUBS_H_ 6 #define HEAP_STUBS_H_
7 7
8 #include "stddef.h" 8 #include "stddef.h"
9 9
10 #define WTF_MAKE_FAST_ALLOCATED \ 10 #define WTF_MAKE_FAST_ALLOCATED \
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 template<typename T> 197 template<typename T>
198 class HeapHashCountedSet : public HashCountedSet<T, void, void, HeapAllocator> { 198 class HeapHashCountedSet : public HashCountedSet<T, void, void, HeapAllocator> {
199 }; 199 };
200 200
201 template<typename K, typename V> 201 template<typename K, typename V>
202 class HeapHashMap : public HashMap<K, V, void, void, void, HeapAllocator> { }; 202 class HeapHashMap : public HashMap<K, V, void, void, void, HeapAllocator> { };
203 203
204 template<typename T> 204 template<typename T>
205 class PersistentHeapVector : public Vector<T, 0, HeapAllocator> { }; 205 class PersistentHeapVector : public Vector<T, 0, HeapAllocator> { };
206 206
207 class Visitor { 207 template <typename Derived>
208 class VisitorHelper {
208 public: 209 public:
209 template<typename T> 210 template<typename T>
210 void trace(const T&); 211 void trace(const T&);
212 };
211 213
214 class Visitor : public VisitorHelper<Visitor> {
215 public:
212 template<typename T, void (T::*method)(Visitor*)> 216 template<typename T, void (T::*method)(Visitor*)>
213 void registerWeakMembers(const T* obj); 217 void registerWeakMembers(const T* obj);
214 }; 218 };
215 219
216 class GarbageCollectedMixin { 220 class GarbageCollectedMixin {
217 virtual void adjustAndMark(Visitor*) const = 0; 221 virtual void adjustAndMark(Visitor*) const = 0;
218 virtual bool isAlive(Visitor*) const = 0; 222 virtual bool isAlive(Visitor*) const = 0;
219 virtual void trace(Visitor*) { } 223 virtual void trace(Visitor*) { }
220 }; 224 };
221 225
(...skipping 16 matching lines...) Expand all
238 namespace WTF { 242 namespace WTF {
239 243
240 template<typename T> 244 template<typename T>
241 struct VectorTraits<blink::Member<T> > { 245 struct VectorTraits<blink::Member<T> > {
242 static const bool needsDestruction = false; 246 static const bool needsDestruction = false;
243 }; 247 };
244 248
245 } 249 }
246 250
247 #endif 251 #endif
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/Config.h ('k') | tools/clang/scripts/update.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698