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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 virtual void adjustAndMark(Visitor*) const override { } \ | 147 virtual void adjustAndMark(Visitor*) const override { } \ |
148 virtual bool isHeapObjectAlive(Visitor*) const override { return 0; } | 148 virtual bool isHeapObjectAlive(Visitor*) const override { return 0; } |
149 | 149 |
150 #define EAGERLY_FINALIZED() typedef int IsEagerlyFinalizedMarker | 150 #define EAGERLY_FINALIZED() typedef int IsEagerlyFinalizedMarker |
151 | 151 |
152 template<typename T> class GarbageCollected { }; | 152 template<typename T> class GarbageCollected { }; |
153 | 153 |
154 template<typename T> | 154 template<typename T> |
155 class GarbageCollectedFinalized : public GarbageCollected<T> { }; | 155 class GarbageCollectedFinalized : public GarbageCollected<T> { }; |
156 | 156 |
| 157 template<typename T> |
| 158 class RefCountedGarbageCollected : public GarbageCollectedFinalized<T> { }; |
| 159 |
157 template<typename T> class Member { | 160 template<typename T> class Member { |
158 public: | 161 public: |
159 operator T*() const { return 0; } | 162 operator T*() const { return 0; } |
160 T* operator->() { return 0; } | 163 T* operator->() { return 0; } |
161 bool operator!() const { return false; } | 164 bool operator!() const { return false; } |
162 }; | 165 }; |
163 | 166 |
164 template<typename T> class WeakMember { | 167 template<typename T> class WeakMember { |
165 public: | 168 public: |
166 operator T*() const { return 0; } | 169 operator T*() const { return 0; } |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 namespace WTF { | 257 namespace WTF { |
255 | 258 |
256 template<typename T> | 259 template<typename T> |
257 struct VectorTraits<blink::Member<T> > { | 260 struct VectorTraits<blink::Member<T> > { |
258 static const bool needsDestruction = false; | 261 static const bool needsDestruction = false; |
259 }; | 262 }; |
260 | 263 |
261 } | 264 } |
262 | 265 |
263 #endif | 266 #endif |
OLD | NEW |