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 { |
11 | 11 |
12 class InlinedGlobalMarkingVisitor final : public VisitorHelper<InlinedGlobalMark
ingVisitor>, public MarkingVisitorImpl<InlinedGlobalMarkingVisitor> { | 12 class InlinedGlobalMarkingVisitor final : public VisitorHelper<InlinedGlobalMark
ingVisitor>, public MarkingVisitorImpl<InlinedGlobalMarkingVisitor> { |
13 public: | 13 public: |
14 friend class VisitorHelper<InlinedGlobalMarkingVisitor>; | 14 friend class VisitorHelper<InlinedGlobalMarkingVisitor>; |
15 using Helper = VisitorHelper<InlinedGlobalMarkingVisitor>; | 15 using Helper = VisitorHelper<InlinedGlobalMarkingVisitor>; |
16 friend class MarkingVisitorImpl<InlinedGlobalMarkingVisitor>; | 16 friend class MarkingVisitorImpl<InlinedGlobalMarkingVisitor>; |
17 using Impl = MarkingVisitorImpl<InlinedGlobalMarkingVisitor>; | 17 using Impl = MarkingVisitorImpl<InlinedGlobalMarkingVisitor>; |
18 | 18 |
19 InlinedGlobalMarkingVisitor() { } | 19 explicit InlinedGlobalMarkingVisitor(ThreadState* state) : VisitorHelper(sta
te) { } |
20 | 20 |
21 // Hack to unify interface to visitor->trace(). | 21 // Hack to unify interface to visitor->trace(). |
22 // Without this hack, we need to use visitor.trace() for | 22 // Without this hack, we need to use visitor.trace() for |
23 // trace(InlinedGlobalMarkingVisitor) and visitor->trace() for trace(Visitor
*). | 23 // trace(InlinedGlobalMarkingVisitor) and visitor->trace() for trace(Visitor
*). |
24 InlinedGlobalMarkingVisitor* operator->() { return this; } | 24 InlinedGlobalMarkingVisitor* operator->() { return this; } |
25 | 25 |
26 using Impl::mark; | 26 using Impl::mark; |
27 using Impl::ensureMarked; | 27 using Impl::ensureMarked; |
28 using Impl::registerDelayedMarkNoTracing; | 28 using Impl::registerDelayedMarkNoTracing; |
29 using Impl::registerWeakTable; | 29 using Impl::registerWeakTable; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |