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

Side by Side Diff: client/linux/minidump_writer/minidump_writer.cc

Issue 1189823002: Update breakpad for Android packed relocations. (Closed) Base URL: https://chromium.googlesource.com/external/google-breakpad/src.git@master
Patch Set: Update for more review comments. Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « client/linux/minidump_writer/linux_dumper.cc ('k') | common/linux/dump_symbols.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010, Google Inc. 1 // Copyright (c) 2010, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 bool Init() { 148 bool Init() {
149 if (!dumper_->Init()) 149 if (!dumper_->Init())
150 return false; 150 return false;
151 151
152 if (fd_ != -1) 152 if (fd_ != -1)
153 minidump_writer_.SetFile(fd_); 153 minidump_writer_.SetFile(fd_);
154 else if (!minidump_writer_.Open(path_)) 154 else if (!minidump_writer_.Open(path_))
155 return false; 155 return false;
156 156
157 return dumper_->ThreadsSuspend(); 157 return dumper_->ThreadsSuspend() && dumper_->LateInit();
158 } 158 }
159 159
160 ~MinidumpWriter() { 160 ~MinidumpWriter() {
161 // Don't close the file descriptor when it's been provided explicitly. 161 // Don't close the file descriptor when it's been provided explicitly.
162 // Callers might still need to use it. 162 // Callers might still need to use it.
163 if (fd_ == -1) 163 if (fd_ == -1)
164 minidump_writer_.Close(); 164 minidump_writer_.Close();
165 dumper_->ThreadsResume(); 165 dumper_->ThreadsResume();
166 } 166 }
167 167
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 const MappingList& mappings, 1364 const MappingList& mappings,
1365 const AppMemoryList& appmem, 1365 const AppMemoryList& appmem,
1366 LinuxDumper* dumper) { 1366 LinuxDumper* dumper) {
1367 MinidumpWriter writer(filename, -1, NULL, mappings, appmem, dumper); 1367 MinidumpWriter writer(filename, -1, NULL, mappings, appmem, dumper);
1368 if (!writer.Init()) 1368 if (!writer.Init())
1369 return false; 1369 return false;
1370 return writer.Dump(); 1370 return writer.Dump();
1371 } 1371 }
1372 1372
1373 } // namespace google_breakpad 1373 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « client/linux/minidump_writer/linux_dumper.cc ('k') | common/linux/dump_symbols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698