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

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

Issue 2531973002: Simple BlinkGC heap compaction. (Closed)
Patch Set: add pointer alignment handling to SparseHeapBitmap 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 2afcfba70189a2ce23dcbd70bc11168a516c8317..3fdc563502b1bba15ccd898309815e51fb4114ad 100644
--- a/third_party/WebKit/Source/wtf/HashTable.h
+++ b/third_party/WebKit/Source/wtf/HashTable.h
@@ -2081,8 +2081,12 @@ void HashTable<Key,
// needed.
if (Traits::weakHandlingFlag == NoWeakHandlingInCollections) {
Allocator::markNoTracing(visitor, m_table);
+ // 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);
} else {
- Allocator::registerDelayedMarkNoTracing(visitor, m_table);
+ Allocator::registerDelayedMarkNoTracing(visitor, &m_table);
// Since we're delaying marking this HashTable, it is possible that the
// registerWeakMembers is called multiple times (in rare
// cases). However, it shouldn't cause any issue.

Powered by Google App Engine
This is Rietveld 408576698