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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 void* operator new(size_t) = delete; | 140 void* operator new(size_t) = delete; |
141 | 141 |
142 #define GC_PLUGIN_IGNORE(bug) \ | 142 #define GC_PLUGIN_IGNORE(bug) \ |
143 __attribute__((annotate("blink_gc_plugin_ignore"))) | 143 __attribute__((annotate("blink_gc_plugin_ignore"))) |
144 | 144 |
145 #define USING_GARBAGE_COLLECTED_MIXIN(type) \ | 145 #define USING_GARBAGE_COLLECTED_MIXIN(type) \ |
146 public: \ | 146 public: \ |
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 |
| 151 |
150 template<typename T> class GarbageCollected { }; | 152 template<typename T> class GarbageCollected { }; |
151 | 153 |
152 template<typename T> | 154 template<typename T> |
153 class GarbageCollectedFinalized : public GarbageCollected<T> { }; | 155 class GarbageCollectedFinalized : public GarbageCollected<T> { }; |
154 | 156 |
155 template<typename T> class Member { | 157 template<typename T> class Member { |
156 public: | 158 public: |
157 operator T*() const { return 0; } | 159 operator T*() const { return 0; } |
158 T* operator->() { return 0; } | 160 T* operator->() { return 0; } |
159 bool operator!() const { return false; } | 161 bool operator!() const { return false; } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 namespace WTF { | 254 namespace WTF { |
253 | 255 |
254 template<typename T> | 256 template<typename T> |
255 struct VectorTraits<blink::Member<T> > { | 257 struct VectorTraits<blink::Member<T> > { |
256 static const bool needsDestruction = false; | 258 static const bool needsDestruction = false; |
257 }; | 259 }; |
258 | 260 |
259 } | 261 } |
260 | 262 |
261 #endif | 263 #endif |
OLD | NEW |