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

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

Issue 2371663002: Introduce an injection point to configure the internal pointer of WeakPtr
Patch Set: fix Created 4 years, 3 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/platform/CrossThreadCopier.h
diff --git a/third_party/WebKit/Source/platform/CrossThreadCopier.h b/third_party/WebKit/Source/platform/CrossThreadCopier.h
index c863a4047bdba6462e1a62ff76a5f9f112326c14..7bd30c2892a4184ac2044326583712a5d9443916 100644
--- a/third_party/WebKit/Source/platform/CrossThreadCopier.h
+++ b/third_party/WebKit/Source/platform/CrossThreadCopier.h
@@ -32,6 +32,7 @@
#define CrossThreadCopier_h
#include "platform/PlatformExport.h"
+#include "platform/heap/Persistent.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "wtf/Assertions.h"
#include "wtf/Forward.h"
@@ -144,7 +145,12 @@ struct CrossThreadCopier<CrossThreadPersistent<T>> : public CrossThreadCopierPas
STATIC_ONLY(CrossThreadCopier);
};
-template<typename T>
+template <typename T>
+struct CrossThreadCopier<WTF::WeakPtr<T>> : public CrossThreadCopierPassThrough<WTF::WeakPtr<T>> {
+ STATIC_ONLY(CrossThreadCopier);
+};
+
+template <typename T>
struct CrossThreadCopier<CrossThreadWeakPersistent<T>> : public CrossThreadCopierPassThrough<CrossThreadWeakPersistent<T>> {
STATIC_ONLY(CrossThreadCopier);
};
@@ -154,8 +160,8 @@ struct CrossThreadCopier<WTF::UnretainedWrapper<T, WTF::CrossThreadAffinity>> :
STATIC_ONLY(CrossThreadCopier);
};
-template<typename T>
-struct CrossThreadCopier<WeakPtr<T>> : public CrossThreadCopierPassThrough<WeakPtr<T>> {
+template <typename T>
+struct CrossThreadCopier<RevocableCrossThreadWeakPersistent<T>> : public CrossThreadCopierPassThrough<RevocableCrossThreadWeakPersistent<T>> {
STATIC_ONLY(CrossThreadCopier);
};

Powered by Google App Engine
This is Rietveld 408576698