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

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

Issue 2531973002: Simple BlinkGC heap compaction. (Closed)
Patch Set: rebased upto r438110 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
« no previous file with comments | « third_party/WebKit/Source/wtf/LinkedHashSet.h ('k') | 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/Vector.h
diff --git a/third_party/WebKit/Source/wtf/Vector.h b/third_party/WebKit/Source/wtf/Vector.h
index f069d933fca4d57674a09a6260c1682f0210eb9c..6410cd274b0a61d83f0347436d7e832b9ec6956d 100644
--- a/third_party/WebKit/Source/wtf/Vector.h
+++ b/third_party/WebKit/Source/wtf/Vector.h
@@ -492,6 +492,8 @@ class VectorBuffer<T, 0, Allocator>
return buffer();
}
+ T** bufferSlot() { return &m_buffer; }
+
protected:
using Base::m_size;
@@ -771,6 +773,8 @@ class VectorBuffer : protected VectorBufferBase<T, true, Allocator> {
return buffer() && buffer() != inlineBuffer();
}
+ T** bufferSlot() { return &m_buffer; }
+
protected:
using Base::m_size;
@@ -1603,6 +1607,7 @@ void Vector<T, inlineCapacity, Allocator>::trace(VisitorDispatcher visitor) {
if (Allocator::isHeapObjectAlive(buffer()))
return;
Allocator::markNoTracing(visitor, buffer());
+ Allocator::registerBackingStoreReference(visitor, Base::bufferSlot());
}
const T* bufferBegin = buffer();
const T* bufferEnd = buffer() + size();
« no previous file with comments | « third_party/WebKit/Source/wtf/LinkedHashSet.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698