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

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

Issue 2125003002: Move CrossThreadCopier from platform/ to wtf/ Base URL: https://chromium.googlesource.com/chromium/src.git@TRV_RemoveTupleInBind
Patch Set: Rebase Created 4 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
Index: third_party/WebKit/Source/wtf/WeakPtr.h
diff --git a/third_party/WebKit/Source/wtf/WeakPtr.h b/third_party/WebKit/Source/wtf/WeakPtr.h
index c377957c80c9397200eaf7c40a91e8131e296578..a2149b74c24cc85f6ce28dd13776a031ccde4de2 100644
--- a/third_party/WebKit/Source/wtf/WeakPtr.h
+++ b/third_party/WebKit/Source/wtf/WeakPtr.h
@@ -26,6 +26,7 @@
#ifndef WTF_WeakPtr_h
#define WTF_WeakPtr_h
+#include "wtf/CrossThreadCopier.h"
#include "wtf/Noncopyable.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
@@ -114,6 +115,11 @@ private:
RefPtr<WeakReference<T>> m_ref;
};
+template<typename T>
+struct CrossThreadCopier<WeakPtr<T>> : public CrossThreadCopierPassThrough<WeakPtr<T>> {
+ STATIC_ONLY(CrossThreadCopier);
+};
+
template<typename T, typename U> inline bool operator==(const WeakPtr<T>& a, const WeakPtr<U>& b)
{
return a.get() == b.get();

Powered by Google App Engine
This is Rietveld 408576698