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

Unified Diff: third_party/WebKit/Source/wtf/TypeTraits.h

Issue 2065443002: Rename and improve "traceable" templates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment rewording Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/TypeTraits.h
diff --git a/third_party/WebKit/Source/wtf/TypeTraits.h b/third_party/WebKit/Source/wtf/TypeTraits.h
index d1e2c425e6f44c45806cc16b270001a36c6d867f..35960152fa572b13367dabc8dfa94524373f3968 100644
--- a/third_party/WebKit/Source/wtf/TypeTraits.h
+++ b/third_party/WebKit/Source/wtf/TypeTraits.h
@@ -248,7 +248,7 @@ class Visitor;
namespace WTF {
template <typename T>
-class NeedsTracing {
+class IsTraceable {
typedef char YesType;
typedef struct NoType {
char padding[8];
@@ -264,17 +264,17 @@ public:
static const bool value = sizeof(YesType) + sizeof(T) == sizeof(checkHasTraceMethod<T>(nullptr)) + sizeof(T);
};
-// Convenience template wrapping the NeedsTracingLazily template in
+// Convenience template wrapping the IsTraceableInCollection template in
// Collection Traits. It helps make the code more readable.
template <typename Traits>
-class NeedsTracingTrait {
+class IsTraceableInCollectionTrait {
public:
- static const bool value = Traits::template NeedsTracingLazily<>::value;
+ static const bool value = Traits::template IsTraceableInCollection<>::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;
+struct IsTraceable<std::pair<T, U>> {
+ static const bool value = IsTraceable<T>::value || IsTraceable<U>::value;
};
// This is used to check that DISALLOW_NEW_EXCEPT_PLACEMENT_NEW objects are not

Powered by Google App Engine
This is Rietveld 408576698