Don't perform marking barrier for weak cell values.

BUG=

Review URL: https://codereview.chromium.org/1124583003

Cr-Commit-Position: refs/heads/master@{#28196}
This commit is contained in:
hpayer 2015-05-04 05:15:38 -07:00 committed by Commit bot
parent d6945db703
commit fff4f8e1bf

View File

@ -1917,7 +1917,13 @@ void WeakCell::clear() {
void WeakCell::initialize(HeapObject* val) {
WRITE_FIELD(this, kValueOffset, val);
WRITE_BARRIER(GetHeap(), this, kValueOffset, val);
Heap* heap = GetHeap();
// We just have to execute the generational barrier here because we never
// mark through a weak cell and collect evacuation candidates when we process
// all weak cells.
if (heap->InNewSpace(val)) {
heap->RecordWrite(address(), kValueOffset);
}
}