OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |