| Index: src/mark-compact.cc
|
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc
|
| index 869b318f547572257b66beb0df92c9e32b2ed814..e093b1850d713346af0028b560e2278d748ca0eb 100644
|
| --- a/src/mark-compact.cc
|
| +++ b/src/mark-compact.cc
|
| @@ -1324,11 +1324,10 @@ class MarkCompactMarkingVisitor
|
| object_size);
|
|
|
| // Mark the backing hash table without pushing it on the marking stack.
|
| - Object* table_object = weak_map->table();
|
| - if (!table_object->IsHashTable()) return;
|
| - ObjectHashTable* table = ObjectHashTable::cast(table_object);
|
| Object** table_slot =
|
| HeapObject::RawField(weak_map, JSWeakMap::kTableOffset);
|
| + if (!(*table_slot)->IsHashTable()) return;
|
| + ObjectHashTable* table = ObjectHashTable::cast(*table_slot);
|
| MarkBit table_mark = Marking::MarkBitFrom(table);
|
| collector->RecordSlot(table_slot, table_slot, table);
|
| if (!table_mark.Get()) collector->SetMark(table, table_mark);
|
| @@ -2411,7 +2410,7 @@ void MarkCompactCollector::ProcessWeakMaps() {
|
| while (weak_map_obj != Smi::FromInt(0)) {
|
| ASSERT(MarkCompactCollector::IsMarked(HeapObject::cast(weak_map_obj)));
|
| JSWeakMap* weak_map = reinterpret_cast<JSWeakMap*>(weak_map_obj);
|
| - ObjectHashTable* table = ObjectHashTable::cast(weak_map->table());
|
| + ObjectHashTable* table = weak_map->table();
|
| Object** anchor = reinterpret_cast<Object**>(table->address());
|
| for (int i = 0; i < table->Capacity(); i++) {
|
| if (MarkCompactCollector::IsMarked(HeapObject::cast(table->KeyAt(i)))) {
|
| @@ -2436,7 +2435,7 @@ void MarkCompactCollector::ClearWeakMaps() {
|
| while (weak_map_obj != Smi::FromInt(0)) {
|
| ASSERT(MarkCompactCollector::IsMarked(HeapObject::cast(weak_map_obj)));
|
| JSWeakMap* weak_map = reinterpret_cast<JSWeakMap*>(weak_map_obj);
|
| - ObjectHashTable* table = ObjectHashTable::cast(weak_map->table());
|
| + ObjectHashTable* table = weak_map->table();
|
| for (int i = 0; i < table->Capacity(); i++) {
|
| if (!MarkCompactCollector::IsMarked(HeapObject::cast(table->KeyAt(i)))) {
|
| table->RemoveEntry(i);
|
|
|