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

Unified Diff: third_party/WebKit/Source/platform/heap/Persistent.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/platform/heap/Persistent.h
diff --git a/third_party/WebKit/Source/platform/heap/Persistent.h b/third_party/WebKit/Source/platform/heap/Persistent.h
index 420d487cb2c0af301e3f82d17f3616d228fb6d22..b9f4e91b62697affa37e3af7dfe35b3f115c8d94 100644
--- a/third_party/WebKit/Source/platform/heap/Persistent.h
+++ b/third_party/WebKit/Source/platform/heap/Persistent.h
@@ -11,6 +11,7 @@
#include "platform/heap/Visitor.h"
#include "wtf/Allocator.h"
#include "wtf/Atomics.h"
+#include "wtf/CrossThreadCopier.h"
namespace blink {
@@ -434,6 +435,19 @@ public:
}
};
+} // namespace blink
+
+namespace WTF {
+
+template<typename T>
+struct CrossThreadCopier<blink::CrossThreadPersistent<T>> : public CrossThreadCopierPassThrough<blink::CrossThreadPersistent<T>> {
+ STATIC_ONLY(CrossThreadCopier);
+};
+
+} // namespace WTF
+
+namespace blink {
+
// Combines the behavior of CrossThreadPersistent and WeakPersistent.
template<typename T>
class CrossThreadWeakPersistent : public PersistentBase<T, WeakPersistentConfiguration, CrossThreadPersistentConfiguration> {
@@ -483,6 +497,19 @@ public:
}
};
+} // namespace blink
+
+namespace WTF {
+
+template<typename T>
+struct CrossThreadCopier<blink::CrossThreadWeakPersistent<T>> : public CrossThreadCopierPassThrough<blink::CrossThreadWeakPersistent<T>> {
+ STATIC_ONLY(CrossThreadCopier);
+};
+
+} // namespace WTF
+
+namespace blink {
+
template<typename Collection>
class PersistentHeapCollectionBase : public Collection {
// We overload the various new and delete operators with using the WTF PartitionAllocator to ensure persistent

Powered by Google App Engine
This is Rietveld 408576698