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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 m_visitor->recordObjectGraphEdge(objectPointer); | 73 m_visitor->recordObjectGraphEdge(objectPointer); |
74 } | 74 } |
75 #endif | 75 #endif |
76 | 76 |
77 private: | 77 private: |
78 static InlinedGlobalMarkingVisitor fromHelper(Helper* helper) | 78 static InlinedGlobalMarkingVisitor fromHelper(Helper* helper) |
79 { | 79 { |
80 return *static_cast<InlinedGlobalMarkingVisitor*>(helper); | 80 return *static_cast<InlinedGlobalMarkingVisitor*>(helper); |
81 } | 81 } |
82 | 82 |
| 83 #if ENABLE(ASSERT) |
| 84 inline void checkMarkingAllowed() { m_visitor->checkMarkingAllowed(); } |
| 85 inline void setAllowMarkingForHashTableWeakProcessing(bool allow) |
| 86 { |
| 87 m_visitor->setAllowMarkingForHashTableWeakProcessing(allow); |
| 88 } |
| 89 #endif |
| 90 |
83 Visitor* m_visitor; | 91 Visitor* m_visitor; |
84 }; | 92 }; |
85 | 93 |
86 // If T does not support trace(InlinedGlobalMarkingVisitor). | 94 // If T does not support trace(InlinedGlobalMarkingVisitor). |
87 template <typename T> | 95 template <typename T> |
88 struct TraceCompatibilityAdaptor<T, false> { | 96 struct TraceCompatibilityAdaptor<T, false> { |
89 inline static void trace(blink::Visitor* visitor, T* self) | 97 inline static void trace(blink::Visitor* visitor, T* self) |
90 { | 98 { |
91 self->trace(visitor); | 99 self->trace(visitor); |
92 } | 100 } |
(...skipping 20 matching lines...) Expand all Loading... |
113 | 121 |
114 inline static void trace(InlinedGlobalMarkingVisitor visitor, T* self) | 122 inline static void trace(InlinedGlobalMarkingVisitor visitor, T* self) |
115 { | 123 { |
116 self->trace(visitor); | 124 self->trace(visitor); |
117 } | 125 } |
118 }; | 126 }; |
119 | 127 |
120 } // namespace blink | 128 } // namespace blink |
121 | 129 |
122 #endif | 130 #endif |
OLD | NEW |