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

Side by Side Diff: tools/clang/blink_gc_plugin/tests/heap/stubs.h

Issue 1433883003: GC plugin: RefPtr<T> is legal if T is RefCountedGC-derived. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/RecordInfo.cpp ('k') | tools/clang/blink_gc_plugin/tests/ref_ptr_to_gc_managed_class.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698