Index: third_party/WebKit/Source/wtf/Functional.h |
diff --git a/third_party/WebKit/Source/wtf/Functional.h b/third_party/WebKit/Source/wtf/Functional.h |
index c23fdc7ef54b4f9943bafff3c162db667f9cc85e..34f721557c687bf5fb58009f24ec7e367afb56dc 100644 |
--- a/third_party/WebKit/Source/wtf/Functional.h |
+++ b/third_party/WebKit/Source/wtf/Functional.h |
@@ -30,6 +30,7 @@ |
#include "base/threading/thread_checker.h" |
#include "wtf/Allocator.h" |
#include "wtf/Assertions.h" |
+#include "wtf/CrossThreadCopier.h" |
#include "wtf/PassRefPtr.h" |
#include "wtf/PtrUtil.h" |
#include "wtf/RefPtr.h" |
@@ -130,6 +131,13 @@ PassedWrapper<T> passed(T&& value) |
return PassedWrapper<T>(std::move(value)); |
} |
+template <typename T> |
+struct CrossThreadCopier<PassedWrapper<T>> { |
+ STATIC_ONLY(CrossThreadCopier); |
+ using Type = PassedWrapper<typename CrossThreadCopier<T>::Type>; |
+ static Type copy(PassedWrapper<T>&& value) { return passed(CrossThreadCopier<T>::copy(value.moveOut())); } |
+}; |
+ |
template <typename T, FunctionThreadAffinity threadAffinity> |
class UnretainedWrapper final { |
public: |
@@ -154,6 +162,11 @@ UnretainedWrapper<T, CrossThreadAffinity> crossThreadUnretained(T* value) |
return UnretainedWrapper<T, CrossThreadAffinity>(value); |
} |
+template<typename T> |
+struct CrossThreadCopier<UnretainedWrapper<T, CrossThreadAffinity>> : public CrossThreadCopierPassThrough<UnretainedWrapper<T, CrossThreadAffinity>> { |
+ STATIC_ONLY(CrossThreadCopier); |
+}; |
+ |
template <typename T> |
struct ParamStorageTraits { |
typedef T StorageType; |