Index: src/heap/slot-set.h |
diff --git a/src/heap/slot-set.h b/src/heap/slot-set.h |
index 5616bc8778518d6a4f2930dff456f95208823b6b..578eb42d1f7e645a8d1403f0862bc6e9bd8bfa18 100644 |
--- a/src/heap/slot-set.h |
+++ b/src/heap/slot-set.h |
@@ -81,10 +81,12 @@ class SlotSet : public Malloced { |
} |
void PreFreeEmptyBucket(int bucket_index) { |
- base::LockGuard<base::Mutex> guard(&to_be_freed_buckets_mutex_); |
base::AtomicValue<uint32_t>* bucket_ptr = bucket[bucket_index].Value(); |
- to_be_freed_buckets_.push(bucket_ptr); |
- bucket[bucket_index].SetValue(nullptr); |
+ if (bucket_ptr != nullptr) { |
+ base::LockGuard<base::Mutex> guard(&to_be_freed_buckets_mutex_); |
+ to_be_freed_buckets_.push(bucket_ptr); |
+ bucket[bucket_index].SetValue(nullptr); |
+ } |
} |
// The slot offsets specify a range of slots at addresses: |