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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 template<typename T, void (T::*method)(Visitor*)> | 41 template<typename T, void (T::*method)(Visitor*)> |
42 void registerWeakMembers(const T* obj) | 42 void registerWeakMembers(const T* obj) |
43 { | 43 { |
44 Helper::template registerWeakMembers<T, method>(obj); | 44 Helper::template registerWeakMembers<T, method>(obj); |
45 } | 45 } |
46 | 46 |
47 protected: | 47 protected: |
48 // Methods to be called from MarkingVisitorImpl. | 48 // Methods to be called from MarkingVisitorImpl. |
49 | 49 |
50 inline bool shouldMarkObject(const void*) | 50 inline bool shouldMarkObject(const void*) const |
51 { | 51 { |
52 // As this is global marking visitor, we need to mark all objects. | 52 // As this is global marking visitor, we need to mark all objects. |
53 return true; | 53 return true; |
54 } | 54 } |
55 | 55 |
56 inline Visitor::MarkingMode getMarkingMode() const | 56 inline Visitor::MarkingMode getMarkingMode() const |
57 { | 57 { |
58 return Visitor::GlobalMarking; | 58 return Visitor::GlobalMarking; |
59 } | 59 } |
60 | 60 |
61 private: | 61 private: |
62 static InlinedGlobalMarkingVisitor fromHelper(Helper* helper) | 62 static InlinedGlobalMarkingVisitor fromHelper(Helper* helper) |
63 { | 63 { |
64 return *static_cast<InlinedGlobalMarkingVisitor*>(helper); | 64 return *static_cast<InlinedGlobalMarkingVisitor*>(helper); |
65 } | 65 } |
66 }; | 66 }; |
67 | 67 |
68 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor) | 68 inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor) |
69 { | 69 { |
70 } | 70 } |
71 | 71 |
72 } // namespace blink | 72 } // namespace blink |
73 | 73 |
74 #endif | 74 #endif |
OLD | NEW |