OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MarkingVisitor_h | |
6 #define MarkingVisitor_h | |
7 | |
8 #include "platform/heap/MarkingVisitorImpl.h" | |
9 | |
10 namespace blink { | |
11 | |
12 class MarkingVisitor final : public Visitor, | |
13 public MarkingVisitorImpl<MarkingVisitor> { | |
14 public: | |
15 using Impl = MarkingVisitorImpl<MarkingVisitor>; | |
16 | |
17 MarkingVisitor(ThreadState* state, VisitorMarkingMode mode) | |
18 : Visitor(state, mode) {} | |
19 | |
20 void markHeader(HeapObjectHeader* header, TraceCallback callback) override { | |
21 Impl::markHeader(header, header->payload(), callback); | |
22 } | |
23 | |
24 void mark(const void* objectPointer, TraceCallback callback) override { | |
25 Impl::mark(objectPointer, callback); | |
26 } | |
27 | |
28 void registerDelayedMarkNoTracing(const void* object) override { | |
29 Impl::registerDelayedMarkNoTracing(object); | |
30 } | |
31 | |
32 void registerWeakMembers(const void* closure, | |
33 const void* objectPointer, | |
34 WeakCallback callback) override { | |
35 Impl::registerWeakMembers(closure, objectPointer, callback); | |
36 } | |
37 | |
38 virtual void registerWeakTable(const void* closure, | |
39 EphemeronCallback iterationCallback, | |
40 EphemeronCallback iterationDoneCallback) { | |
41 Impl::registerWeakTable(closure, iterationCallback, iterationDoneCallback); | |
42 } | |
43 | |
44 #if DCHECK_IS_ON() | |
45 virtual bool weakTableRegistered(const void* closure) { | |
46 return Impl::weakTableRegistered(closure); | |
47 } | |
48 #endif | |
49 | |
50 bool ensureMarked(const void* objectPointer) override { | |
51 return Impl::ensureMarked(objectPointer); | |
52 } | |
53 | |
54 void registerWeakCellWithCallback(void** cell, | |
55 WeakCallback callback) override { | |
56 Impl::registerWeakCellWithCallback(cell, callback); | |
57 } | |
58 }; | |
59 | |
60 } // namespace blink | |
61 | |
62 #endif | |
OLD | NEW |