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

Side by Side Diff: Source/platform/heap/TraceTraits.h

Issue 1168683002: Oilpan: Introduce WeakProcessingVisitor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/ThreadState.cpp ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 TraceTraits_h 5 #ifndef TraceTraits_h
6 #define TraceTraits_h 6 #define TraceTraits_h
7 7
8 #include "platform/heap/GCInfo.h" 8 #include "platform/heap/GCInfo.h"
9 #include "platform/heap/Heap.h" 9 #include "platform/heap/Heap.h"
10 #include "platform/heap/InlinedGlobalMarkingVisitor.h" 10 #include "platform/heap/InlinedGlobalMarkingVisitor.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 { 150 {
151 AdjustAndMarkTrait<T>::mark(visitor, t); 151 AdjustAndMarkTrait<T>::mark(visitor, t);
152 } 152 }
153 }; 153 };
154 154
155 template<typename T> class TraceTrait<const T> : public TraceTrait<T> { }; 155 template<typename T> class TraceTrait<const T> : public TraceTrait<T> { };
156 156
157 template<typename T> 157 template<typename T>
158 void TraceTrait<T>::trace(Visitor* visitor, void* self) 158 void TraceTrait<T>::trace(Visitor* visitor, void* self)
159 { 159 {
160 if (visitor->isGlobalMarkingVisitor()) { 160 if (visitor->markingMode() == Visitor::GlobalMarking) {
161 // Switch to inlined global marking dispatch. 161 // Switch to inlined global marking dispatch.
162 static_cast<T*>(self)->trace(InlinedGlobalMarkingVisitor(visitor)); 162 static_cast<T*>(self)->trace(InlinedGlobalMarkingVisitor(visitor));
163 } else { 163 } else {
164 static_cast<T*>(self)->trace(visitor); 164 static_cast<T*>(self)->trace(visitor);
165 } 165 }
166 } 166 }
167 167
168 template<typename T> 168 template<typename T>
169 void TraceTrait<T>::trace(InlinedGlobalMarkingVisitor visitor, void* self) 169 void TraceTrait<T>::trace(InlinedGlobalMarkingVisitor visitor, void* self)
170 { 170 {
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 // since iterating over the hash table backing will find the whole 541 // since iterating over the hash table backing will find the whole
542 // chain. 542 // chain.
543 visitor->markNoTracing(node); 543 visitor->markNoTracing(node);
544 return false; 544 return false;
545 } 545 }
546 }; 546 };
547 547
548 } // namespace WTF 548 } // namespace WTF
549 549
550 #endif 550 #endif
OLDNEW
« no previous file with comments | « Source/platform/heap/ThreadState.cpp ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698