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

Unified Diff: Source/platform/heap/Visitor.h

Issue 828453003: Revert of Templatize visitor arguments for TraceTrait mark and trace methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/heap/HeapTest.cpp ('k') | Source/wtf/Deque.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Visitor.h
diff --git a/Source/platform/heap/Visitor.h b/Source/platform/heap/Visitor.h
index 3e9d21891861c322483c6dd58d7a454152b75d2e..7102e9725b5875ba8a09fe85ac18569b79b8a01d 100644
--- a/Source/platform/heap/Visitor.h
+++ b/Source/platform/heap/Visitor.h
@@ -199,14 +199,13 @@
public:
// Default implementation of TraceTrait<T>::trace just statically
// dispatches to the trace method of the class T.
- template<typename VisitorDispatcher>
- static void trace(VisitorDispatcher visitor, void* self)
+ template<typename TraceDispatcher>
+ static void trace(TraceDispatcher visitor, void* self)
{
TraceCompatibilityAdaptor<T>::trace(visitor, static_cast<T*>(self));
}
- template<typename VisitorDispatcher>
- static void mark(VisitorDispatcher visitor, const T* t)
+ static void mark(Visitor* visitor, const T* t)
{
DefaultTraceTrait<T>::mark(visitor, t);
}
@@ -670,8 +669,7 @@
struct OffHeapCollectionTraceTrait<WTF::Vector<T, N, WTF::DefaultAllocator> > {
typedef WTF::Vector<T, N, WTF::DefaultAllocator> Vector;
- template<typename VisitorDispatcher>
- static void trace(VisitorDispatcher visitor, const Vector& vector)
+ static void trace(Visitor* visitor, const Vector& vector)
{
if (vector.isEmpty())
return;
@@ -684,8 +682,7 @@
struct OffHeapCollectionTraceTrait<WTF::Deque<T, N> > {
typedef WTF::Deque<T, N> Deque;
- template<typename VisitorDispatcher>
- static void trace(VisitorDispatcher visitor, const Deque& deque)
+ static void trace(Visitor* visitor, const Deque& deque)
{
if (deque.isEmpty())
return;
@@ -706,8 +703,7 @@
template<typename T>
class DefaultTraceTrait<T, false> {
public:
- template<typename VisitorDispatcher>
- static void mark(VisitorDispatcher visitor, const T* t)
+ static void mark(Visitor* visitor, const T* t)
{
// Default mark method of the trait just calls the two-argument mark
// method on the visitor. The second argument is the static trace method
@@ -747,8 +743,7 @@
template<typename T>
class DefaultTraceTrait<T, true> {
public:
- template<typename VisitorDispatcher>
- static void mark(VisitorDispatcher visitor, const T* self)
+ static void mark(Visitor* visitor, const T* self)
{
if (!self)
return;
« no previous file with comments | « Source/platform/heap/HeapTest.cpp ('k') | Source/wtf/Deque.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698