Index: snapshot/mac/memory_snapshot_mac.cc |
diff --git a/snapshot/mac/memory_snapshot_mac.cc b/snapshot/mac/memory_snapshot_mac.cc |
index ce6b7bcba58e6b55b1710aa5f9cd582b8e131fca..b0cce244a385366ee6b1ba3574b2fbd79e32b950 100644 |
--- a/snapshot/mac/memory_snapshot_mac.cc |
+++ b/snapshot/mac/memory_snapshot_mac.cc |
@@ -52,6 +52,11 @@ size_t MemorySnapshotMac::Size() const { |
bool MemorySnapshotMac::Read(Delegate* delegate) const { |
INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
+ |
+ if (size_ == 0) { |
+ return delegate->MemorySnapshotDelegateRead(nullptr, size_); |
+ } |
+ |
scoped_ptr<uint8_t[]> buffer(new uint8_t[size_]); |
if (!process_reader_->Memory()->Read(address_, size_, buffer.get())) { |
return false; |