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

Unified Diff: base/process/process_posix.cc

Issue 2797283002: Fixing std::swap(x, x) in base. (Closed)
Patch Set: Created 3 years, 8 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
« base/pickle.cc ('K') | « base/pickle_unittest.cc ('k') | base/values.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_posix.cc
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index 9b94891dd961ba8b972ead181bf4ca5d1c0beca4..bbb342c4cf49a4b6c9072faacf5e6df78f384140 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -225,7 +225,6 @@ Process::Process(Process&& other) : process_(other.process_) {
}
Process& Process::operator=(Process&& other) {
- DCHECK_NE(this, &other);
process_ = other.process_;
other.Close();
danakj 2017/04/05 19:17:40 How does this not close itself?
danakj 2017/04/05 20:33:41 This looks like a broken assignment period. Proce
dyaroshev 2017/04/05 20:42:47 Closing actually just assigns a special value to h
danakj 2017/04/05 20:59:34 Hrm.. ok ya.. weird. That wasn't what I expected,
return *this;
« base/pickle.cc ('K') | « base/pickle_unittest.cc ('k') | base/values.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698