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

Unified Diff: Source/wtf/ListHashSet.h

Issue 274023002: Oilpan: Avoid declaring a destructor for garbage collected ListHashSet. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: macro fix Created 6 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
« no previous file with comments | « Source/wtf/LinkedHashSet.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/ListHashSet.h
diff --git a/Source/wtf/ListHashSet.h b/Source/wtf/ListHashSet.h
index 12b83451ee425228c4dcd4541920936e131c0f8f..34ec3517b1ef0b3fbb785016e5a5c5f827d4d4d3 100644
--- a/Source/wtf/ListHashSet.h
+++ b/Source/wtf/ListHashSet.h
@@ -59,7 +59,8 @@ namespace WTF {
// Note that for a ListHashSet you cannot specify the HashTraits as a
// template argument. It uses the default hash traits for the ValueArg
// type.
- template<typename ValueArg, size_t inlineCapacity = 256, typename HashArg = typename DefaultHash<ValueArg>::Hash, typename AllocatorArg = ListHashSetAllocator<ValueArg, inlineCapacity> > class ListHashSet {
+ template<typename ValueArg, size_t inlineCapacity = 256, typename HashArg = typename DefaultHash<ValueArg>::Hash, typename AllocatorArg = ListHashSetAllocator<ValueArg, inlineCapacity> > class ListHashSet
+ : public HashTableDestructorBase<ListHashSet<ValueArg, inlineCapacity, HashArg, AllocatorArg>, AllocatorArg::isGarbageCollected> {
typedef AllocatorArg Allocator;
WTF_USE_ALLOCATOR(ListHashSet, Allocator);
@@ -98,7 +99,7 @@ namespace WTF {
ListHashSet();
ListHashSet(const ListHashSet&);
ListHashSet& operator=(const ListHashSet&);
- ~ListHashSet();
+ void finalize();
void swap(ListHashSet&);
@@ -673,10 +674,10 @@ namespace WTF {
}
template<typename T, size_t inlineCapacity, typename U, typename V>
- inline ListHashSet<T, inlineCapacity, U, V>::~ListHashSet()
+ inline void ListHashSet<T, inlineCapacity, U, V>::finalize()
{
- if (!Allocator::isGarbageCollected)
- deleteAllNodes();
+ ASSERT(!Allocator::isGarbageCollected);
Mikhail 2014/05/09 08:06:36 think now it can be COMPILE_ASSERT
zerny-chromium 2014/05/09 09:19:48 Done.
+ deleteAllNodes();
}
template<typename T, size_t inlineCapacity, typename U, typename V>
« no previous file with comments | « Source/wtf/LinkedHashSet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698