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

Unified Diff: Source/platform/CrossThreadCopier.h

Issue 388463002: Oilpan: fix build after r177815 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rely on implicit conversions. Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/CrossThreadCopier.h
diff --git a/Source/platform/CrossThreadCopier.h b/Source/platform/CrossThreadCopier.h
index e471d0ae3d458ebe360d208de4d8f804814f64a8..94c364040f57e1638f412d1bb6c6a96965da6ce1 100644
--- a/Source/platform/CrossThreadCopier.h
+++ b/Source/platform/CrossThreadCopier.h
@@ -37,6 +37,7 @@
#include "wtf/Forward.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/PassRefPtr.h"
+#include "wtf/RawPtr.h"
#include "wtf/RefPtr.h"
#include "wtf/ThreadSafeRefCounted.h"
#include "wtf/TypeTraits.h"
@@ -151,11 +152,38 @@ namespace WebCore {
}
};
+ template<typename T> struct CrossThreadCopierBase<false, false, true, RawPtr<T> > {
+ typedef RawPtr<T> Type;
+ static Type copy(const Type& ptr)
+ {
+ return ptr;
+ }
+ };
+
+ template<typename T> struct CrossThreadCopierBase<false, false, true, Member<T> > {
+ typedef RawPtr<T> Type;
+ static Type copy(const Member<T>& ptr)
+ {
+ return ptr;
+ }
+ };
+
+ template<typename T> struct CrossThreadCopierBase<false, false, true, WeakMember<T> > {
+ typedef RawPtr<T> Type;
+ static Type copy(const WeakMember<T>& ptr)
+ {
+ return ptr;
+ }
+ };
+
template<typename T> struct CrossThreadCopier : public CrossThreadCopierBase<WTF::IsConvertibleToInteger<T>::value,
WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, RefPtr>::Type, ThreadSafeRefCounted>::value
|| WTF::IsSubclassOfTemplate<typename WTF::RemovePointer<T>::Type, ThreadSafeRefCounted>::value
|| WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, PassRefPtr>::Type, ThreadSafeRefCounted>::value,
- WTF::IsSubclassOfTemplate<typename WTF::RemovePointer<T>::Type, GarbageCollected>::value,
+ WTF::IsSubclassOfTemplate<typename WTF::RemovePointer<T>::Type, GarbageCollected>::value
+ || WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, RawPtr>::Type, GarbageCollected>::value
+ || WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, Member>::Type, GarbageCollected>::value
+ || WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, WeakMember>::Type, GarbageCollected>::value,
T> {
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698