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

Unified Diff: Source/platform/heap/GCInfo.h

Issue 1086413003: Oilpan: HeapVectorBacking should call destructors for its elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased past r194046 (upto r194085.) Created 5 years, 8 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
« no previous file with comments | « no previous file | Source/platform/heap/Heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/GCInfo.h
diff --git a/Source/platform/heap/GCInfo.h b/Source/platform/heap/GCInfo.h
index e433b9b6cd86357da88a63c7ecccb601c6aa9f8b..466aafc4e8778e844fbd16dee913740f7f35164a 100644
--- a/Source/platform/heap/GCInfo.h
+++ b/Source/platform/heap/GCInfo.h
@@ -156,23 +156,10 @@ struct FinalizerTrait<HeapHashTableBacking<Table>> {
static void finalize(void* obj) { FinalizerTraitImpl<HeapHashTableBacking<Table>, nonTrivialFinalizer>::finalize(obj); }
};
-// TODO(haraken): Replace this GCInfoTraits with FinalizerTraits.
template<typename T, typename Traits>
-struct GCInfoTrait<HeapVectorBacking<T, Traits>> {
- static size_t index()
- {
- using TargetType = HeapVectorBacking<T, Traits>;
- static const GCInfo gcInfo = {
- TraceTrait<TargetType>::trace,
- FinalizerTrait<TargetType>::finalize,
- Traits::needsDestruction,
- false, // We don't support embedded objects in HeapVectors with vtables.
-#if ENABLE(GC_PROFILING)
- TypenameStringTrait<TargetType>::get()
-#endif
- };
- RETURN_GCINFO_INDEX();
- }
+struct FinalizerTrait<HeapVectorBacking<T, Traits>> {
+ static const bool nonTrivialFinalizer = Traits::needsDestruction;
+ static void finalize(void* obj) { FinalizerTraitImpl<HeapVectorBacking<T, Traits>, nonTrivialFinalizer>::finalize(obj); }
};
template<typename T, typename U, typename V, typename W, typename X> class HeapHashMap;
« no previous file with comments | « no previous file | Source/platform/heap/Heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698