Better location for adding ExtraMemory snapshots

Follow up to https://codereview.chromium.org/1364053002/.

R=mark@chromium.org
BUG=crashpad:46

Review URL: https://codereview.chromium.org/1369823002 .
This commit is contained in:
Scott Graham 2015-09-25 13:42:57 -07:00
parent 599eda0403
commit 9bc0a99681

View File

@ -93,14 +93,14 @@ void MinidumpFileWriter::InitializeFromSnapshot(
auto crashpad_info = make_scoped_ptr(new MinidumpCrashpadInfoWriter()); auto crashpad_info = make_scoped_ptr(new MinidumpCrashpadInfoWriter());
crashpad_info->InitializeFromSnapshot(process_snapshot); crashpad_info->InitializeFromSnapshot(process_snapshot);
memory_list->AddFromSnapshot(process_snapshot->ExtraMemory());
// Since the MinidumpCrashpadInfo stream is an extension, its safe to not add // Since the MinidumpCrashpadInfo stream is an extension, its safe to not add
// it to the minidump file if it wouldnt carry any useful information. // it to the minidump file if it wouldnt carry any useful information.
if (crashpad_info->IsUseful()) { if (crashpad_info->IsUseful()) {
AddStream(crashpad_info.Pass()); AddStream(crashpad_info.Pass());
} }
memory_list->AddFromSnapshot(process_snapshot->ExtraMemory());
AddStream(memory_list.Pass()); AddStream(memory_list.Pass());
} }