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

Unified Diff: base/trace_event/trace_event_argument.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (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
« no previous file with comments | « base/test/gtest_util.cc ('k') | base/trace_event/trace_event_memory_overhead.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_event_argument.cc
diff --git a/base/trace_event/trace_event_argument.cc b/base/trace_event/trace_event_argument.cc
index 646b1f2168794fca6ec2108b085b1014a2205830..db702b6231e5249c9526d27ac439450c732e39a6 100644
--- a/base/trace_event/trace_event_argument.cc
+++ b/base/trace_event/trace_event_argument.cc
@@ -289,7 +289,7 @@
value.GetAsList(&list_value);
BeginArrayWithCopiedName(name);
for (const auto& base_value : *list_value)
- AppendBaseValue(base_value);
+ AppendBaseValue(*base_value);
EndArray();
} break;
}
@@ -343,7 +343,7 @@
value.GetAsList(&list_value);
BeginArray();
for (const auto& base_value : *list_value)
- AppendBaseValue(base_value);
+ AppendBaseValue(*base_value);
EndArray();
} break;
}
@@ -369,11 +369,9 @@
cur_dict = new_dict;
} else {
cur_list->Append(WrapUnique(new_dict));
- // |new_dict| is invalidated at this point, so |cur_dict| needs to be
- // reset.
- cur_list->GetDictionary(cur_list->GetSize() - 1, &cur_dict);
stack.push_back(cur_list);
cur_list = nullptr;
+ cur_dict = new_dict;
}
} break;
@@ -398,8 +396,7 @@
} else {
cur_list->Append(WrapUnique(new_list));
stack.push_back(cur_list);
- // |cur_list| is invalidated at this point, so it needs to be reset.
- cur_list->GetList(cur_list->GetSize() - 1, &cur_list);
+ cur_list = new_list;
}
} break;
« no previous file with comments | « base/test/gtest_util.cc ('k') | base/trace_event/trace_event_memory_overhead.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698