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

Unified Diff: third_party/WebKit/Source/platform/heap/HeapAllocator.h

Issue 1999343002: Unify and provide one IsGarbageCollectedType<T> implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test Created 4 years, 7 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/HeapAllocator.h
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.h b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
index 8b43e8b53fa2e0ae2f4c68ca13c53f264aa13b2c..40e0d381d90225e8c4bdae2271e9e72bf48ae07b 100644
--- a/third_party/WebKit/Source/platform/heap/HeapAllocator.h
+++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
@@ -23,6 +23,7 @@ namespace blink {
template<typename T, typename Traits = WTF::VectorTraits<T>> class HeapVectorBacking {
DISALLOW_NEW();
+ IS_GARBAGE_COLLECTED_TYPE();
public:
static void finalize(void* pointer);
void finalizeGarbageCollectedObject() { finalize(this); }
@@ -30,6 +31,7 @@ public:
template<typename Table> class HeapHashTableBacking {
DISALLOW_NEW();
+ IS_GARBAGE_COLLECTED_TYPE();
public:
static void finalize(void* pointer);
void finalizeGarbageCollectedObject() { finalize(this); }
@@ -544,6 +546,11 @@ struct NeedsTracing<ListHashSetNode<T, blink::HeapListHashSetAllocator<T, inline
static const bool value = true;
};
+template<typename T, size_t inlineCapacity>
+struct IsGarbageCollectedType<ListHashSetNode<T, blink::HeapListHashSetAllocator<T, inlineCapacity>>> {
+ static const bool value = true;
+};
+
} // namespace WTF
#endif
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Handle.h ('k') | third_party/WebKit/Source/platform/heap/HeapTerminatedArray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698