Commit fff4f8e1 authored by hpayer's avatar hpayer Committed by Commit bot

Don't perform marking barrier for weak cell values.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#28196}
parent d6945db7
...@@ -1917,7 +1917,13 @@ void WeakCell::clear() { ...@@ -1917,7 +1917,13 @@ void WeakCell::clear() {
void WeakCell::initialize(HeapObject* val) { void WeakCell::initialize(HeapObject* val) {
WRITE_FIELD(this, kValueOffset, 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);
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment