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

Unified Diff: minidump/minidump_thread_writer.cc

Issue 1483073004: Replace use of .Pass() with crashpad::move(). (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: pass: . Created 5 years, 1 month 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_system_info_writer_test.cc ('k') | minidump/minidump_thread_writer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_thread_writer.cc
diff --git a/minidump/minidump_thread_writer.cc b/minidump/minidump_thread_writer.cc
index 72050bdb167575d63719a56c30a31deed483faeb..ab426c3d005eeb68a9bd9ca52ca025457df80604 100644
--- a/minidump/minidump_thread_writer.cc
+++ b/minidump/minidump_thread_writer.cc
@@ -22,6 +22,7 @@
#include "snapshot/memory_snapshot.h"
#include "snapshot/thread_snapshot.h"
#include "util/file/file_writer.h"
+#include "util/stdlib/move.h"
#include "util/numeric/safe_assignment.h"
namespace crashpad {
@@ -52,12 +53,12 @@ void MinidumpThreadWriter::InitializeFromSnapshot(
if (stack_snapshot && stack_snapshot->Size() > 0) {
scoped_ptr<MinidumpMemoryWriter> stack =
MinidumpMemoryWriter::CreateFromSnapshot(stack_snapshot);
- SetStack(stack.Pass());
+ SetStack(crashpad::move(stack));
}
scoped_ptr<MinidumpContextWriter> context =
MinidumpContextWriter::CreateFromSnapshot(thread_snapshot->Context());
- SetContext(context.Pass());
+ SetContext(crashpad::move(context));
}
const MINIDUMP_THREAD* MinidumpThreadWriter::MinidumpThread() const {
@@ -69,14 +70,14 @@ const MINIDUMP_THREAD* MinidumpThreadWriter::MinidumpThread() const {
void MinidumpThreadWriter::SetStack(scoped_ptr<MinidumpMemoryWriter> stack) {
DCHECK_EQ(state(), kStateMutable);
- stack_ = stack.Pass();
+ stack_ = crashpad::move(stack);
}
void MinidumpThreadWriter::SetContext(
scoped_ptr<MinidumpContextWriter> context) {
DCHECK_EQ(state(), kStateMutable);
- context_ = context.Pass();
+ context_ = crashpad::move(context);
}
bool MinidumpThreadWriter::Freeze() {
@@ -148,7 +149,7 @@ void MinidumpThreadListWriter::InitializeFromSnapshot(
for (const ThreadSnapshot* thread_snapshot : thread_snapshots) {
auto thread = make_scoped_ptr(new MinidumpThreadWriter());
thread->InitializeFromSnapshot(thread_snapshot, thread_id_map);
- AddThread(thread.Pass());
+ AddThread(crashpad::move(thread));
}
// Do this in a separate loop to keep the thread stacks earlier in the dump,
« no previous file with comments | « minidump/minidump_system_info_writer_test.cc ('k') | minidump/minidump_thread_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698