Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/WebKit/Source/platform/heap/MarkingVisitor.h

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 MarkingVisitor_h 5 #ifndef MarkingVisitor_h
6 #define MarkingVisitor_h 6 #define MarkingVisitor_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 template <Visitor::MarkingMode Mode> 12 template <Visitor::MarkingMode Mode>
13 class MarkingVisitor final : public Visitor, public MarkingVisitorImpl<MarkingVi sitor<Mode>> { 13 class MarkingVisitor final : public Visitor, public MarkingVisitorImpl<MarkingVi sitor<Mode>> {
14 public: 14 public:
15 using Impl = MarkingVisitorImpl<MarkingVisitor<Mode>>; 15 using Impl = MarkingVisitorImpl<MarkingVisitor<Mode>>;
16 friend class MarkingVisitorImpl<MarkingVisitor<Mode>>; 16 friend class MarkingVisitorImpl<MarkingVisitor<Mode>>;
17 17
18 MarkingVisitor() 18 MarkingVisitor(GCData* gcData)
haraken 2016/01/28 15:52:50 Add explicit.
keishi 2016/02/29 06:02:33 Done.
19 : Visitor(Mode) 19 : Visitor(Mode, gcData)
20 { 20 {
21 } 21 }
22 22
23 void markHeader(HeapObjectHeader* header, TraceCallback callback) override 23 void markHeader(HeapObjectHeader* header, TraceCallback callback) override
24 { 24 {
25 Impl::markHeader(header, header->payload(), callback); 25 Impl::markHeader(header, header->payload(), callback);
26 } 26 }
27 27
28 void mark(const void* objectPointer, TraceCallback callback) override 28 void mark(const void* objectPointer, TraceCallback callback) override
29 { 29 {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // When doing a thread local GC, the marker checks if 73 // When doing a thread local GC, the marker checks if
74 // the object resides in another thread's heap. If it 74 // the object resides in another thread's heap. If it
75 // does, the object should not be marked & traced. 75 // does, the object should not be marked & traced.
76 return page->terminating(); 76 return page->terminating();
77 } 77 }
78 }; 78 };
79 79
80 } // namespace blink 80 } // namespace blink
81 81
82 #endif 82 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698