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

Unified Diff: third_party/WebKit/Source/wtf/HashTable.h

Issue 1378273002: Retire GC lockout on initializing hash buckets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reinstate enter/leaveGCForbiddenScope()..needed elsewhere Created 5 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/HashTable.h
diff --git a/third_party/WebKit/Source/wtf/HashTable.h b/third_party/WebKit/Source/wtf/HashTable.h
index ff7731eb21dc702f1bad312ecc2d2cde4baf93c8..9f9154f25d93519716e1798ac6e4088d94a1076d 100644
--- a/third_party/WebKit/Source/wtf/HashTable.h
+++ b/third_party/WebKit/Source/wtf/HashTable.h
@@ -791,13 +791,7 @@ template <> struct HashTableBucketInitializer<true> {
template <typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits, typename Allocator>
inline void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits, Allocator>::initializeBucket(ValueType& bucket)
{
- // The key and value cannot be initialied atomically, and it would be wrong
- // to have a GC when only one was initialized and the other still contained
- // garbage (eg. from a previous use of the same slot). Therefore we forbid
- // a GC while both the key and the value are initialized.
- Allocator::enterGCForbiddenScope();
HashTableBucketInitializer<Traits::emptyValueIsZero>::template initialize<Traits>(bucket);
- Allocator::leaveGCForbiddenScope();
}
template <typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits, typename Allocator>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698