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

Unified Diff: sky/engine/wtf/TypeTraits.h

Issue 729733002: Remove more bits of the Oilpan tracing system (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/wtf/ListHashSet.h ('k') | sky/engine/wtf/Vector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/wtf/TypeTraits.h
diff --git a/sky/engine/wtf/TypeTraits.h b/sky/engine/wtf/TypeTraits.h
index c3534a44935e727c04eba06777048cb681ce0c6c..fbb9c62617c78334b73b54aaa09bc75e1be93009 100644
--- a/sky/engine/wtf/TypeTraits.h
+++ b/sky/engine/wtf/TypeTraits.h
@@ -306,35 +306,6 @@ namespace WTF {
};
};
-template<typename T>
-class NeedsTracing {
- typedef char YesType;
- typedef struct NoType {
- char padding[8];
- } NoType;
- template<size_t> struct HasMethod;
- template<typename V> static YesType checkHasTraceMethod(HasMethod<sizeof(&V::trace)>*);
- template<typename V> static NoType checkHasTraceMethod(...);
-public:
- // We add sizeof(T) to both sides here, because we want it to fail for
- // incomplete types. Otherwise it just assumes that incomplete types do not
- // have a trace method, which may not be true.
- static const bool value = sizeof(YesType) + sizeof(T) == sizeof(checkHasTraceMethod<T>(0)) + sizeof(T);
-};
-
-// Convenience template wrapping the NeedsTracingLazily template in
-// Collection Traits. It helps make the code more readable.
-template<typename Traits>
-class ShouldBeTraced {
-public:
- static const bool value = Traits::template NeedsTracingLazily<>::value;
-};
-
-template<typename T, typename U>
-struct NeedsTracing<std::pair<T, U> > {
- static const bool value = NeedsTracing<T>::value || NeedsTracing<U>::value || IsWeak<T>::value || IsWeak<U>::value;
-};
-
} // namespace WTF
#endif // TypeTraits_h
« no previous file with comments | « sky/engine/wtf/ListHashSet.h ('k') | sky/engine/wtf/Vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698