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

Unified Diff: minidump/minidump_module_writer.cc

Issue 633163002: Simplify MinidumpModuleWriter’s module name requirement implementation (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 | « no previous file | no next file » | 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 66ad8d5af7700ab83da8df701b107353d50df0bb..04c8b1771e33c7df7cb52c73ed79105e3153993b 100644
--- a/minidump/minidump_module_writer.cc
+++ b/minidump/minidump_module_writer.cc
@@ -250,13 +250,12 @@ void MinidumpModuleWriter::SetFileFlagsAndMask(uint32_t file_flags,
bool MinidumpModuleWriter::Freeze() {
DCHECK_EQ(state(), kStateMutable);
+ CHECK(name_);
if (!MinidumpWritable::Freeze()) {
return false;
}
- CHECK(name_);
-
name_->RegisterRVA(&module_.ModuleNameRva);
if (codeview_record_) {
@@ -281,11 +280,10 @@ size_t MinidumpModuleWriter::SizeOfObject() {
std::vector<internal::MinidumpWritable*> MinidumpModuleWriter::Children() {
DCHECK_GE(state(), kStateFrozen);
+ DCHECK(name_);
std::vector<MinidumpWritable*> children;
- if (name_) {
- children.push_back(name_.get());
- }
+ children.push_back(name_.get());
if (codeview_record_) {
children.push_back(codeview_record_);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698