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