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

Unified Diff: minidump/minidump_exception_writer.cc

Issue 674153002: minidump: Change the ownership model (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback 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_exception_writer.h ('k') | minidump/minidump_exception_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_exception_writer.cc
diff --git a/minidump/minidump_exception_writer.cc b/minidump/minidump_exception_writer.cc
index 064c601428f9617e920685d84e0685c115d488c8..2f39497b48f2e6eab5f80dbbfadc62a313ad5769 100644
--- a/minidump/minidump_exception_writer.cc
+++ b/minidump/minidump_exception_writer.cc
@@ -26,10 +26,14 @@ MinidumpExceptionWriter::MinidumpExceptionWriter()
: MinidumpStreamWriter(), exception_(), context_(nullptr) {
}
-void MinidumpExceptionWriter::SetContext(MinidumpContextWriter* context) {
+MinidumpExceptionWriter::~MinidumpExceptionWriter() {
+}
+
+void MinidumpExceptionWriter::SetContext(
+ scoped_ptr<MinidumpContextWriter> context) {
DCHECK_EQ(state(), kStateMutable);
- context_ = context;
+ context_ = context.Pass();
}
void MinidumpExceptionWriter::SetExceptionInformation(
@@ -76,7 +80,7 @@ std::vector<internal::MinidumpWritable*> MinidumpExceptionWriter::Children() {
DCHECK(context_);
std::vector<MinidumpWritable*> children;
- children.push_back(context_);
+ children.push_back(context_.get());
return children;
}
« no previous file with comments | « minidump/minidump_exception_writer.h ('k') | minidump/minidump_exception_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698