| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 GarbageCollected_h | 5 #ifndef GarbageCollected_h |
| 6 #define GarbageCollected_h | 6 #define GarbageCollected_h |
| 7 | 7 |
| 8 #include "platform/heap/ThreadState.h" | 8 #include "platform/heap/ThreadState.h" |
| 9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
| 10 #include "wtf/Assertions.h" | 10 #include "wtf/Assertions.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // when the "operator new" for B runs, and leaving the forbidden GC scope | 196 // when the "operator new" for B runs, and leaving the forbidden GC scope |
| 197 // when the constructor of the recorded GarbageCollectedMixinConstructorMarker | 197 // when the constructor of the recorded GarbageCollectedMixinConstructorMarker |
| 198 // runs. | 198 // runs. |
| 199 #define USING_GARBAGE_COLLECTED_MIXIN(TYPE) \ | 199 #define USING_GARBAGE_COLLECTED_MIXIN(TYPE) \ |
| 200 DEFINE_GARBAGE_COLLECTED_MIXIN_METHODS(blink::Visitor*, TYPE) \ | 200 DEFINE_GARBAGE_COLLECTED_MIXIN_METHODS(blink::Visitor*, TYPE) \ |
| 201 DEFINE_GARBAGE_COLLECTED_MIXIN_METHODS(blink::InlinedGlobalMarkingVisitor, T
YPE) \ | 201 DEFINE_GARBAGE_COLLECTED_MIXIN_METHODS(blink::InlinedGlobalMarkingVisitor, T
YPE) \ |
| 202 DEFINE_GARBAGE_COLLECTED_MIXIN_CONSTRUCTOR_MARKER(TYPE) \ | 202 DEFINE_GARBAGE_COLLECTED_MIXIN_CONSTRUCTOR_MARKER(TYPE) \ |
| 203 public: \ | 203 public: \ |
| 204 bool isHeapObjectAlive() const override \ | 204 bool isHeapObjectAlive() const override \ |
| 205 { \ | 205 { \ |
| 206 return Heap::isHeapObjectAlive(this); \ | 206 return ThreadHeap::isHeapObjectAlive(this); \ |
| 207 } \ | 207 } \ |
| 208 private: | 208 private: |
| 209 | 209 |
| 210 #if ENABLE(OILPAN) | 210 #if ENABLE(OILPAN) |
| 211 #define WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TYPE) USING_GARBAGE_COLLECTED_MIXI
N(TYPE) | 211 #define WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TYPE) USING_GARBAGE_COLLECTED_MIXI
N(TYPE) |
| 212 #else | 212 #else |
| 213 #define WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TYPE) | 213 #define WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TYPE) |
| 214 #endif | 214 #endif |
| 215 | 215 |
| 216 // An empty class with a constructor that's arranged invoked when all derived co
nstructors | 216 // An empty class with a constructor that's arranged invoked when all derived co
nstructors |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 395 |
| 396 namespace WTF { | 396 namespace WTF { |
| 397 | 397 |
| 398 // Adoption is not needed nor wanted for RefCountedGarbageCollected<>-derived ty
pes. | 398 // Adoption is not needed nor wanted for RefCountedGarbageCollected<>-derived ty
pes. |
| 399 template<typename T> | 399 template<typename T> |
| 400 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; | 400 PassRefPtr<T> adoptRef(blink::RefCountedGarbageCollected<T>*) = delete; |
| 401 | 401 |
| 402 } // namespace WTF | 402 } // namespace WTF |
| 403 | 403 |
| 404 #endif | 404 #endif |
| OLD | NEW |