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

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: rebase 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; \
76 void* operator new(size_t, void*) = delete;
76 77
77 #define STACK_ALLOCATED() \ 78 #define STACK_ALLOCATED() \
78 private: \ 79 private: \
79 __attribute__((annotate("blink_stack_allocated"))) \ 80 __attribute__((annotate("blink_stack_allocated"))) \
80 void* operator new(size_t) = delete; 81 void* operator new(size_t) = delete; \
82 void* operator new(size_t, void*) = delete;
81 83
82 #define GC_PLUGIN_IGNORE(bug) \ 84 #define GC_PLUGIN_IGNORE(bug) \
83 __attribute__((annotate("blink_gc_plugin_ignore"))) 85 __attribute__((annotate("blink_gc_plugin_ignore")))
84 86
85 #define USING_GARBAGE_COLLECTED_MIXIN(type) \ 87 #define USING_GARBAGE_COLLECTED_MIXIN(type) \
86 public: \ 88 public: \
87 virtual void adjustAndMark(Visitor*) const {} \ 89 virtual void adjustAndMark(Visitor*) const {} \
88 virtual bool isAlive(Visitor*) const { return 0; } 90 virtual bool isAlive(Visitor*) const { return 0; }
89 91
90 template<typename T> class GarbageCollected { }; 92 template<typename T> class GarbageCollected { };
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 namespace WTF { 134 namespace WTF {
133 135
134 template<typename T> 136 template<typename T>
135 struct VectorTraits<WebCore::Member<T> > { 137 struct VectorTraits<WebCore::Member<T> > {
136 static const bool needsDestruction = false; 138 static const bool needsDestruction = false;
137 }; 139 };
138 140
139 } 141 }
140 142
141 #endif 143 #endif
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/RecordInfo.cpp ('k') | tools/clang/blink_gc_plugin/tests/stack_allocated.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698