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:
parent
d6945db703
commit
fff4f8e1bf
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user