| 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 InlinedGlobalMarkingVisitor_h | 5 #ifndef InlinedGlobalMarkingVisitor_h |
| 6 #define InlinedGlobalMarkingVisitor_h | 6 #define InlinedGlobalMarkingVisitor_h |
| 7 | 7 |
| 8 #include "platform/heap/MarkingVisitorImpl.h" | 8 #include "platform/heap/MarkingVisitorImpl.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 { | 41 { |
| 42 Helper::mark(t); | 42 Helper::mark(t); |
| 43 } | 43 } |
| 44 | 44 |
| 45 template<typename T, void (T::*method)(Visitor*)> | 45 template<typename T, void (T::*method)(Visitor*)> |
| 46 void registerWeakMembers(const T* obj) | 46 void registerWeakMembers(const T* obj) |
| 47 { | 47 { |
| 48 Helper::template registerWeakMembers<T, method>(obj); | 48 Helper::template registerWeakMembers<T, method>(obj); |
| 49 } | 49 } |
| 50 | 50 |
| 51 Visitor* getUninlined() { return m_visitor; } | 51 ThreadHeap& heap() { return m_visitor->heap(); } |
| 52 |
| 52 protected: | 53 protected: |
| 53 // Methods to be called from MarkingVisitorImpl. | 54 // Methods to be called from MarkingVisitorImpl. |
| 54 | 55 |
| 55 inline bool shouldMarkObject(const void*) | 56 inline bool shouldMarkObject(const void*) |
| 56 { | 57 { |
| 57 // As this is global marking visitor, we need to mark all objects. | 58 // As this is global marking visitor, we need to mark all objects. |
| 58 return true; | 59 return true; |
| 59 } | 60 } |
| 60 | 61 |
| 61 inline Visitor::MarkingMode getMarkingMode() const | 62 inline Visitor::MarkingMode getMarkingMode() const |
| (...skipping 10 matching lines...) Expand all Loading... |
| 72 Visitor* m_visitor; | 73 Visitor* m_visitor; |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor) | 76 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor) |
| 76 { | 77 { |
| 77 } | 78 } |
| 78 | 79 |
| 79 } // namespace blink | 80 } // namespace blink |
| 80 | 81 |
| 81 #endif | 82 #endif |
| OLD | NEW |