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

Side by Side Diff: Source/wtf/ListHashSet.h

Issue 319593004: Oilpan:Allow custom handling of classes that contain weak pointers that are embedded in collections. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove 'typename' that Win compiler does not like Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/wtf/LinkedHashSet.h ('k') | Source/wtf/TypeTraits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com> 3 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 if (!m_head) 989 if (!m_head)
990 return; 990 return;
991 991
992 for (Node* node = m_head, *next = m_head->next(); node; node = next, nex t = node ? node->next() : 0) 992 for (Node* node = m_head, *next = m_head->next(); node; node = next, nex t = node ? node->next() : 0)
993 node->destroy(this->allocator()); 993 node->destroy(this->allocator());
994 } 994 }
995 995
996 template<typename T, size_t inlineCapacity, typename U, typename V> 996 template<typename T, size_t inlineCapacity, typename U, typename V>
997 void ListHashSet<T, inlineCapacity, U, V>::trace(typename Allocator::Visitor * visitor) 997 void ListHashSet<T, inlineCapacity, U, V>::trace(typename Allocator::Visitor * visitor)
998 { 998 {
999 COMPILE_ASSERT(HashTraits<T>::weakHandlingFlag == NoWeakHandlingInCollec tions, ListHashSetDoesNotSupportWeakness);
999 // This marks all the nodes and their contents live that can be 1000 // This marks all the nodes and their contents live that can be
1000 // accessed through the HashTable. 1001 // accessed through the HashTable.
1001 m_impl.trace(visitor); 1002 m_impl.trace(visitor);
1002 // Due to the order in which entries are added to the hash table vs. 1003 // Due to the order in which entries are added to the hash table vs.
1003 // when they are put in the linked list we have now marked all the 1004 // when they are put in the linked list we have now marked all the
1004 // nodes live. 1005 // nodes live.
1005 ASSERT(!m_head || Allocator::isAlive(visitor, m_head)); 1006 ASSERT(!m_head || Allocator::isAlive(visitor, m_head));
1006 ASSERT(!m_tail || Allocator::isAlive(visitor, m_tail)); 1007 ASSERT(!m_tail || Allocator::isAlive(visitor, m_tail));
1007 } 1008 }
1008 1009
1009 } // namespace WTF 1010 } // namespace WTF
1010 1011
1011 using WTF::ListHashSet; 1012 using WTF::ListHashSet;
1012 1013
1013 #endif /* WTF_ListHashSet_h */ 1014 #endif /* WTF_ListHashSet_h */
OLDNEW
« no previous file with comments | « Source/wtf/LinkedHashSet.h ('k') | Source/wtf/TypeTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698