| 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 #define WTF_MAKE_FAST_ALLOCATED \ | 10 #define WTF_MAKE_FAST_ALLOCATED \ |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 typename KeyArg, | 111 typename KeyArg, |
| 112 typename MappedArg, | 112 typename MappedArg, |
| 113 typename HashArg = void, | 113 typename HashArg = void, |
| 114 typename KeyTraitsArg = void, | 114 typename KeyTraitsArg = void, |
| 115 typename MappedTraitsArg = void, | 115 typename MappedTraitsArg = void, |
| 116 typename Allocator = DefaultAllocator> | 116 typename Allocator = DefaultAllocator> |
| 117 class HashMap {}; | 117 class HashMap {}; |
| 118 | 118 |
| 119 } | 119 } |
| 120 | 120 |
| 121 namespace WebCore { | 121 namespace blink { |
| 122 | 122 |
| 123 using namespace WTF; | 123 using namespace WTF; |
| 124 | 124 |
| 125 #define DISALLOW_ALLOCATION() \ | 125 #define DISALLOW_ALLOCATION() \ |
| 126 private: \ | 126 private: \ |
| 127 void* operator new(size_t) = delete; \ | 127 void* operator new(size_t) = delete; \ |
| 128 void* operator new(size_t, void*) = delete; | 128 void* operator new(size_t, void*) = delete; |
| 129 | 129 |
| 130 #define STACK_ALLOCATED() \ | 130 #define STACK_ALLOCATED() \ |
| 131 private: \ | 131 private: \ |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 template<typename T, void (T::*method)(Visitor*)> | 212 template<typename T, void (T::*method)(Visitor*)> |
| 213 void registerWeakMembers(const T* obj); | 213 void registerWeakMembers(const T* obj); |
| 214 }; | 214 }; |
| 215 | 215 |
| 216 class GarbageCollectedMixin { | 216 class GarbageCollectedMixin { |
| 217 virtual void adjustAndMark(Visitor*) const = 0; | 217 virtual void adjustAndMark(Visitor*) const = 0; |
| 218 virtual bool isAlive(Visitor*) const = 0; | 218 virtual bool isAlive(Visitor*) const = 0; |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 // WebCore::ScriptWrappable receives special treatment | 221 // blink::ScriptWrappable receives special treatment |
| 222 // so as to allow it to be used together with GarbageCollected<T>, | 222 // so as to allow it to be used together with GarbageCollected<T>, |
| 223 // even when its user-declared destructor is provided. | 223 // even when its user-declared destructor is provided. |
| 224 // As it is with Oilpan disabled. | 224 // As it is with Oilpan disabled. |
| 225 class ScriptWrappable { | 225 class ScriptWrappable { |
| 226 public: | 226 public: |
| 227 ~ScriptWrappable() { /* user-declared, thus, non-trivial */ } | 227 ~ScriptWrappable() { /* user-declared, thus, non-trivial */ } |
| 228 }; | 228 }; |
| 229 | 229 |
| 230 } | 230 } |
| 231 | 231 |
| 232 namespace WTF { | 232 namespace WTF { |
| 233 | 233 |
| 234 template<typename T> | 234 template<typename T> |
| 235 struct VectorTraits<WebCore::Member<T> > { | 235 struct VectorTraits<blink::Member<T> > { |
| 236 static const bool needsDestruction = false; | 236 static const bool needsDestruction = false; |
| 237 }; | 237 }; |
| 238 | 238 |
| 239 } | 239 } |
| 240 | 240 |
| 241 #endif | 241 #endif |
| OLD | NEW |