Index: src/store-buffer.cc |
diff --git a/src/store-buffer.cc b/src/store-buffer.cc |
index ab810e40060e867c5a0960fc60152b3696baa4b3..c67d147fb4d06cef927f873180b211027e828d22 100644 |
--- a/src/store-buffer.cc |
+++ b/src/store-buffer.cc |
@@ -390,11 +390,13 @@ void StoreBuffer::VerifyPointers(LargeObjectSpace* space) { |
void StoreBuffer::Verify() { |
#ifdef DEBUG |
- VerifyPointers(heap_->old_pointer_space(), |
- &StoreBuffer::FindPointersToNewSpaceInRegion); |
- VerifyPointers(heap_->map_space(), |
- &StoreBuffer::FindPointersToNewSpaceInMapsRegion); |
- VerifyPointers(heap_->lo_space()); |
+ if (FLAG_enable_slow_asserts || FLAG_verify_heap) { |
+ VerifyPointers(heap_->old_pointer_space(), |
+ &StoreBuffer::FindPointersToNewSpaceInRegion); |
+ VerifyPointers(heap_->map_space(), |
+ &StoreBuffer::FindPointersToNewSpaceInMapsRegion); |
+ VerifyPointers(heap_->lo_space()); |
+ } |
#endif |
} |