| Index: src/objects-inl.h
|
| diff --git a/src/objects-inl.h b/src/objects-inl.h
|
| index 4033f886a065980213c6442924390117f13e708f..e848798310aef82ef96e646a6a99408d178c5354 100644
|
| --- a/src/objects-inl.h
|
| +++ b/src/objects-inl.h
|
| @@ -2036,7 +2036,10 @@ Object* WeakCell::value() const { return READ_FIELD(this, kValueOffset); }
|
|
|
|
|
| void WeakCell::clear() {
|
| - DCHECK(GetHeap()->gc_state() == Heap::MARK_COMPACT);
|
| + // Either the garbage collector is clearing the cell or we are simply
|
| + // initializing the root empty weak cell.
|
| + DCHECK(GetHeap()->gc_state() == Heap::MARK_COMPACT ||
|
| + this == GetHeap()->empty_weak_cell());
|
| WRITE_FIELD(this, kValueOffset, Smi::FromInt(0));
|
| }
|
|
|
|
|