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

Unified Diff: chrome/browser/autofill/autofill_profile.cc

Issue 5521005: AutoFillProfile: Don't clobber data on self-assignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar bettar Created 10 years 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 | chrome/browser/autofill/autofill_profile_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_profile.cc
diff --git a/chrome/browser/autofill/autofill_profile.cc b/chrome/browser/autofill/autofill_profile.cc
index 40a749b2e8347fd18f9a6f5b25459a4b28864492..b269865b645a60fa6a1fc423056a3992e73225cb 100644
--- a/chrome/browser/autofill/autofill_profile.cc
+++ b/chrome/browser/autofill/autofill_profile.cc
@@ -379,6 +379,9 @@ bool AutoFillProfile::IsEmpty() const {
}
void AutoFillProfile::operator=(const AutoFillProfile& source) {
+ if (this == &source)
+ return;
+
label_ = source.label_;
guid_ = source.guid_;
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_profile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698