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

Unified Diff: base/values.cc

Issue 3163020: Fix DictionaryValue::Equals() to also detect differences in key names. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: fix test expectations Created 10 years, 4 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 | « no previous file | base/values_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index 20e61759ebe5388c989555a24f72772d42527790..60c623ebabfb6517937599ff3d684617c7c72dce 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -339,7 +339,8 @@ bool DictionaryValue::Equals(const Value* other) const {
while (lhs_it != end_keys() && rhs_it != other_dict->end_keys()) {
Value* lhs;
Value* rhs;
- if (!GetWithoutPathExpansion(*lhs_it, &lhs) ||
+ if (*lhs_it != *rhs_it ||
+ !GetWithoutPathExpansion(*lhs_it, &lhs) ||
!other_dict->GetWithoutPathExpansion(*rhs_it, &rhs) ||
!lhs->Equals(rhs)) {
return false;
« no previous file with comments | « no previous file | base/values_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698