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

Unified Diff: third_party/WebKit/Source/platform/CrossThreadCopier.h

Issue 1477213003: More switching to standard type traits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Excluded WTF::IsSubclass from the patch Created 5 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
Index: third_party/WebKit/Source/platform/CrossThreadCopier.h
diff --git a/third_party/WebKit/Source/platform/CrossThreadCopier.h b/third_party/WebKit/Source/platform/CrossThreadCopier.h
index 92e155e0e8c5e61c47660a97c2a71e6269964dc8..af49e35aafc30c684bfa485079e9bc35029e4579 100644
--- a/third_party/WebKit/Source/platform/CrossThreadCopier.h
+++ b/third_party/WebKit/Source/platform/CrossThreadCopier.h
@@ -87,9 +87,9 @@ namespace blink {
typedef typename std::remove_pointer<TypeWithoutPassRefPtr>::type RefCountedType;
// Verify that only one of the above did a change.
- static_assert((WTF::IsSameType<RefPtr<RefCountedType>, T>::value
- || WTF::IsSameType<PassRefPtr<RefCountedType>, T>::value
- || WTF::IsSameType<RefCountedType*, T>::value),
+ static_assert((std::is_same<RefPtr<RefCountedType>, T>::value
+ || std::is_same<PassRefPtr<RefCountedType>, T>::value
+ || std::is_same<RefCountedType*, T>::value),
"only one type modification should be allowed");
typedef PassRefPtr<RefCountedType> Type;
@@ -184,7 +184,7 @@ namespace blink {
}
};
- template<typename T> struct CrossThreadCopier : public CrossThreadCopierBase<WTF::IsConvertibleToInteger<T>::value,
+ template<typename T> struct CrossThreadCopier : public CrossThreadCopierBase<std::is_convertible<T, int>::value,
WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, RefPtr>::Type, ThreadSafeRefCounted>::value
|| WTF::IsSubclassOfTemplate<typename std::remove_pointer<T>::type, ThreadSafeRefCounted>::value
|| WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, PassRefPtr>::Type, ThreadSafeRefCounted>::value,
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableSection.cpp ('k') | third_party/WebKit/Source/platform/CrossThreadCopier.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698