OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 GarbageCollected_h | 5 #ifndef GarbageCollected_h |
6 #define GarbageCollected_h | 6 #define GarbageCollected_h |
7 | 7 |
8 #include "platform/heap/ThreadState.h" | 8 #include "platform/heap/ThreadState.h" |
9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
10 #include "wtf/Assertions.h" | 10 #include "wtf/Assertions.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 || HeapHashMapSubclass::value | 92 || HeapHashMapSubclass::value |
93 || HeapVectorSubclass::value | 93 || HeapVectorSubclass::value |
94 || HeapDequeSubclass::value | 94 || HeapDequeSubclass::value |
95 || HeapHashCountedSetSubclass::value | 95 || HeapHashCountedSetSubclass::value |
96 || HeapTerminatedArraySubclass::value | 96 || HeapTerminatedArraySubclass::value |
97 || HeapVectorBackingSubclass::value | 97 || HeapVectorBackingSubclass::value |
98 || HeapHashTableBackingSubclass::value | 98 || HeapHashTableBackingSubclass::value |
99 || isHeapAllocatedListHashSetNode; | 99 || isHeapAllocatedListHashSetNode; |
100 }; | 100 }; |
101 | 101 |
| 102 template <> |
| 103 struct IsGarbageCollectedType<void> { |
| 104 static const bool value = false; |
| 105 }; |
| 106 |
102 // The GarbageCollectedMixin interface and helper macro | 107 // The GarbageCollectedMixin interface and helper macro |
103 // USING_GARBAGE_COLLECTED_MIXIN can be used to automatically define | 108 // USING_GARBAGE_COLLECTED_MIXIN can be used to automatically define |
104 // TraceTrait/ObjectAliveTrait on non-leftmost deriving classes | 109 // TraceTrait/ObjectAliveTrait on non-leftmost deriving classes |
105 // which need to be garbage collected. | 110 // which need to be garbage collected. |
106 // | 111 // |
107 // Consider the following case: | 112 // Consider the following case: |
108 // class B {}; | 113 // class B {}; |
109 // class A : public GarbageCollected, public B {}; | 114 // class A : public GarbageCollected, public B {}; |
110 // | 115 // |
111 // We can't correctly handle "Member<B> p = &a" as we can't compute addr of | 116 // We can't correctly handle "Member<B> p = &a" as we can't compute addr of |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 static const bool value = sizeof(TrueType) == sizeof(isSizeofKnown(&t)); | 311 static const bool value = sizeof(TrueType) == sizeof(isSizeofKnown(&t)); |
307 }; | 312 }; |
308 | 313 |
309 } // namespace blink | 314 } // namespace blink |
310 | 315 |
311 namespace WTF { | 316 namespace WTF { |
312 | 317 |
313 } // namespace WTF | 318 } // namespace WTF |
314 | 319 |
315 #endif | 320 #endif |
OLD | NEW |