Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Unified Diff: snapshot/mac/memory_snapshot_mac.cc

Issue 641603006: Add MinidumpMemoryListWriter::AddFromSnapshot(), everything downstream and its test (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Correctly look for the last memory range at EOF Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « minidump/minidump_module_writer_test.cc ('k') | snapshot/memory_snapshot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « minidump/minidump_module_writer_test.cc ('k') | snapshot/memory_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698