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

Side by Side Diff: third_party/WebKit/Source/platform/heap/GarbageCollected.h

Issue 1923183002: Add support for IsGarbageCollectedType<void> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: auto-Rebase Created 4 years, 7 months 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 | « no previous file | third_party/WebKit/Source/platform/heap/Handle.h » ('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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/Handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698