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

Side by Side Diff: third_party/WebKit/Source/wtf/HashTable.h

Issue 2694173002: Remove thread-local weak processing (Closed)
Patch Set: temp Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/platform/heap/VisitorImpl.h ('k') | no next file » | 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 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 David Levin <levin@chromium.org> 4 * Copyright (C) 2008 David Levin <levin@chromium.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after
2083 // register a weakProcessing callback which will perform weak processing if 2083 // register a weakProcessing callback which will perform weak processing if
2084 // needed. 2084 // needed.
2085 if (Traits::weakHandlingFlag == NoWeakHandlingInCollections) { 2085 if (Traits::weakHandlingFlag == NoWeakHandlingInCollections) {
2086 Allocator::markNoTracing(visitor, m_table); 2086 Allocator::markNoTracing(visitor, m_table);
2087 } else { 2087 } else {
2088 Allocator::registerDelayedMarkNoTracing(visitor, m_table); 2088 Allocator::registerDelayedMarkNoTracing(visitor, m_table);
2089 // Since we're delaying marking this HashTable, it is possible that the 2089 // Since we're delaying marking this HashTable, it is possible that the
2090 // registerWeakMembers is called multiple times (in rare 2090 // registerWeakMembers is called multiple times (in rare
2091 // cases). However, it shouldn't cause any issue. 2091 // cases). However, it shouldn't cause any issue.
2092 Allocator::registerWeakMembers( 2092 Allocator::registerWeakMembers(
2093 visitor, this, m_table, 2093 visitor, this,
2094 WeakProcessingHashTableHelper<Traits::weakHandlingFlag, Key, Value, 2094 WeakProcessingHashTableHelper<Traits::weakHandlingFlag, Key, Value,
2095 Extractor, HashFunctions, Traits, 2095 Extractor, HashFunctions, Traits,
2096 KeyTraits, Allocator>::process); 2096 KeyTraits, Allocator>::process);
2097 } 2097 }
2098 // If the backing store will be moved by sweep compaction, register the 2098 // If the backing store will be moved by sweep compaction, register the
2099 // table reference pointing to the backing store object, so that the 2099 // table reference pointing to the backing store object, so that the
2100 // reference is updated upon object relocation. A no-op if not enabled 2100 // reference is updated upon object relocation. A no-op if not enabled
2101 // by the visitor. 2101 // by the visitor.
2102 Allocator::registerBackingStoreReference(visitor, &m_table); 2102 Allocator::registerBackingStoreReference(visitor, &m_table);
2103 if (!IsTraceableInCollectionTrait<Traits>::value) 2103 if (!IsTraceableInCollectionTrait<Traits>::value)
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 CollectionIterator end(toBeRemoved.end()); 2270 CollectionIterator end(toBeRemoved.end());
2271 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) 2271 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it)
2272 collection.remove(*it); 2272 collection.remove(*it);
2273 } 2273 }
2274 2274
2275 } // namespace WTF 2275 } // namespace WTF
2276 2276
2277 #include "wtf/HashIterators.h" 2277 #include "wtf/HashIterators.h"
2278 2278
2279 #endif // WTF_HashTable_h 2279 #endif // WTF_HashTable_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/VisitorImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698