| Index: third_party/WebKit/Source/wtf/PassRefPtr.h
|
| diff --git a/third_party/WebKit/Source/wtf/PassRefPtr.h b/third_party/WebKit/Source/wtf/PassRefPtr.h
|
| index 8926a126364d9acb9c916516130e61f549d376bb..2910b5481c7ac9cbeb105846cb4de892e9dba317 100644
|
| --- a/third_party/WebKit/Source/wtf/PassRefPtr.h
|
| +++ b/third_party/WebKit/Source/wtf/PassRefPtr.h
|
| @@ -23,8 +23,12 @@
|
|
|
| #include "wtf/Allocator.h"
|
| #include "wtf/Assertions.h"
|
| +#include "wtf/CrossThreadCopier.h"
|
| +#include "wtf/ThreadSafeRefCounted.h"
|
| #include "wtf/TypeTraits.h"
|
|
|
| +class SkRefCnt;
|
| +
|
| namespace WTF {
|
|
|
| template <typename T> class RefPtr;
|
| @@ -100,6 +104,12 @@ private:
|
| };
|
|
|
| template <typename T>
|
| +struct CrossThreadCopier<PassRefPtr<T>> : public CrossThreadCopierPassThrough<PassRefPtr<T>> {
|
| + STATIC_ONLY(CrossThreadCopier);
|
| + static_assert(IsSubclassOfTemplate<T, ThreadSafeRefCounted>::value || std::is_base_of<SkRefCnt, T>::value, "PassRefPtr<T> can be passed across threads only if T is ThreadSafeRefCounted or SkRefCnt.");
|
| +};
|
| +
|
| +template <typename T>
|
| PassRefPtr<T> wrapPassRefPtr(T* ptr)
|
| {
|
| return PassRefPtr<T>(ptr);
|
|
|