OLD | NEW |
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 class Visitor : public VisitorHelper<Visitor> { | 214 class Visitor : public VisitorHelper<Visitor> { |
215 public: | 215 public: |
216 template<typename T, void (T::*method)(Visitor*)> | 216 template<typename T, void (T::*method)(Visitor*)> |
217 void registerWeakMembers(const T* obj); | 217 void registerWeakMembers(const T* obj); |
218 }; | 218 }; |
219 | 219 |
220 class InlinedGlobalMarkingVisitor | 220 class InlinedGlobalMarkingVisitor |
221 : public VisitorHelper<InlinedGlobalMarkingVisitor> { | 221 : public VisitorHelper<InlinedGlobalMarkingVisitor> { |
222 public: | 222 public: |
223 InlinedGlobalMarkingVisitor* operator->() { return this; } | 223 InlinedGlobalMarkingVisitor* operator->() { return this; } |
| 224 |
| 225 template<typename T, void (T::*method)(Visitor*)> |
| 226 void registerWeakMembers(const T* obj); |
224 }; | 227 }; |
225 | 228 |
226 class GarbageCollectedMixin { | 229 class GarbageCollectedMixin { |
227 public: | 230 public: |
228 virtual void adjustAndMark(Visitor*) const = 0; | 231 virtual void adjustAndMark(Visitor*) const = 0; |
229 virtual bool isHeapObjectAlive(Visitor*) const = 0; | 232 virtual bool isHeapObjectAlive(Visitor*) const = 0; |
230 virtual void trace(Visitor*) { } | 233 virtual void trace(Visitor*) { } |
231 }; | 234 }; |
232 | 235 |
233 template<typename T> | 236 template<typename T> |
(...skipping 15 matching lines...) Expand all Loading... |
249 namespace WTF { | 252 namespace WTF { |
250 | 253 |
251 template<typename T> | 254 template<typename T> |
252 struct VectorTraits<blink::Member<T> > { | 255 struct VectorTraits<blink::Member<T> > { |
253 static const bool needsDestruction = false; | 256 static const bool needsDestruction = false; |
254 }; | 257 }; |
255 | 258 |
256 } | 259 } |
257 | 260 |
258 #endif | 261 #endif |
OLD | NEW |