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

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

Issue 2531973002: Simple BlinkGC heap compaction. (Closed)
Patch Set: tweak assert Created 4 years 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
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 c3735e9de3dea61026237f229babb370be8a90c0..9bceee0450cc562d8355f4bc68479f51cb3074a9 100644
--- a/third_party/WebKit/Source/wtf/HashTable.h
+++ b/third_party/WebKit/Source/wtf/HashTable.h
@@ -2092,6 +2092,7 @@ void HashTable<Key,
// place after we know if the backing is reachable from elsewhere. We also
// register a weakProcessing callback which will perform weak processing if
// needed.
+
if (Traits::weakHandlingFlag == NoWeakHandlingInCollections) {
Allocator::markNoTracing(visitor, m_table);
} else {
@@ -2105,6 +2106,10 @@ void HashTable<Key,
Extractor, HashFunctions, Traits,
KeyTraits, Allocator>::process);
}
+ // If the backing store will be moved by sweep compaction, register the
+ // table reference pointing to the backing store object, so that the
+ // reference is updated upon object relocation.
+ Allocator::registerBackingStoreReference(visitor, &m_table);
if (!IsTraceableInCollectionTrait<Traits>::value)
return;
if (Traits::weakHandlingFlag == WeakHandlingInCollections) {

Powered by Google App Engine
This is Rietveld 408576698