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

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

Issue 206123004: Add checks for stack-allocated types and their uses in fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 namespace WTF { 10 namespace WTF {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 }; 65 };
66 66
67 } 67 }
68 68
69 namespace WebCore { 69 namespace WebCore {
70 70
71 using namespace WTF; 71 using namespace WTF;
72 72
73 #define DISALLOW_ALLOCATION() \ 73 #define DISALLOW_ALLOCATION() \
74 private: \ 74 private: \
75 void* operator new(size_t) = delete; 75 void* operator new(size_t) = delete;
Mads Ager (chromium) 2014/03/20 10:32:29 Just to play it safe, maybe you should add it here
zerny-chromium 2014/03/20 15:14:20 Done.
76 76
77 #define STACK_ALLOCATED() \ 77 #define STACK_ALLOCATED() \
78 private: \ 78 private: \
79 __attribute__((annotate("blink_stack_allocated"))) \ 79 __attribute__((annotate("blink_stack_allocated"))) \
80 void* operator new(size_t) = delete; 80 void* operator new(size_t) = delete; \
81 void* operator new(size_t, void*) = delete;
81 82
82 #define GC_PLUGIN_IGNORE(bug) \ 83 #define GC_PLUGIN_IGNORE(bug) \
83 __attribute__((annotate("blink_gc_plugin_ignore"))) 84 __attribute__((annotate("blink_gc_plugin_ignore")))
84 85
85 #define USING_GARBAGE_COLLECTED_MIXIN(type) \ 86 #define USING_GARBAGE_COLLECTED_MIXIN(type) \
86 public: \ 87 public: \
87 virtual void adjustAndMark(Visitor*) const {} \ 88 virtual void adjustAndMark(Visitor*) const {} \
88 virtual bool isAlive(Visitor*) const { return 0; } 89 virtual bool isAlive(Visitor*) const { return 0; }
89 90
90 template<typename T> class GarbageCollected { }; 91 template<typename T> class GarbageCollected { };
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 namespace WTF { 133 namespace WTF {
133 134
134 template<typename T> 135 template<typename T>
135 struct VectorTraits<WebCore::Member<T> > { 136 struct VectorTraits<WebCore::Member<T> > {
136 static const bool needsDestruction = false; 137 static const bool needsDestruction = false;
137 }; 138 };
138 139
139 } 140 }
140 141
141 #endif 142 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698