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

Unified Diff: Source/wtf/DefaultAllocator.h

Issue 131803005: Add more oilpan collections support (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix OtherType for Windows compielr Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: Source/wtf/DefaultAllocator.h
diff --git a/Source/wtf/DefaultAllocator.h b/Source/wtf/DefaultAllocator.h
index 004587dec1577b4496b1de2e17f5c1361f077275..67071e06850334e00dd492fea8762698103b70d7 100644
--- a/Source/wtf/DefaultAllocator.h
+++ b/Source/wtf/DefaultAllocator.h
@@ -107,10 +107,21 @@ public:
}
template<typename T, typename Traits>
- static void mark(...)
+ static void trace(...)
{
ASSERT_NOT_REACHED();
}
+
+ template<typename T>
+ struct OtherType {
+ typedef T* Type;
+ };
+
+ template<typename T>
+ static T& getOther(T* other)
+ {
+ return *other;
+ }
};
// The Windows compiler seems to be very eager to instantiate things it won't
« Source/heap/Heap.h ('K') | « Source/heap/Visitor.h ('k') | Source/wtf/HashMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698