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

Unified Diff: minidump/minidump_module_writer.cc

Issue 678473003: minidump: Be consistent about setting the fields of WritableIoVec (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: 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_memory_writer.cc ('k') | minidump/minidump_simple_string_dictionary_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_module_writer.cc
diff --git a/minidump/minidump_module_writer.cc b/minidump/minidump_module_writer.cc
index d674760fed921a7a8624a9ed916b009f3fcd9a95..765215546aa5bea718b5a3748093a33630d740fc 100644
--- a/minidump/minidump_module_writer.cc
+++ b/minidump/minidump_module_writer.cc
@@ -154,7 +154,6 @@ bool MinidumpModuleMiscDebugRecordWriter::WriteObject(
iov.iov_len = base_length;
std::vector<WritableIoVec> iovecs(1, iov);
- iov.iov_len = image_debug_misc_.Length - base_length;
if (!image_debug_misc_.Unicode) {
DCHECK(data_utf16_.empty());
iov.iov_base = &data_[0];
@@ -162,6 +161,7 @@ bool MinidumpModuleMiscDebugRecordWriter::WriteObject(
DCHECK(data_.empty());
iov.iov_base = &data_utf16_[0];
}
+ iov.iov_len = image_debug_misc_.Length - base_length;
iovecs.push_back(iov);
return file_writer->WriteIoVec(&iovecs);
@@ -358,8 +358,8 @@ bool MinidumpModuleListWriter::WriteObject(FileWriterInterface* file_writer) {
std::vector<WritableIoVec> iovecs(1, iov);
for (const MinidumpModuleWriter* module : modules_) {
- iov.iov_len = sizeof(MINIDUMP_MODULE);
iov.iov_base = module->MinidumpModule();
+ iov.iov_len = sizeof(MINIDUMP_MODULE);
iovecs.push_back(iov);
}
« no previous file with comments | « minidump/minidump_memory_writer.cc ('k') | minidump/minidump_simple_string_dictionary_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698