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

Unified Diff: tools/json_schema_compiler/util.cc

Issue 1926933002: Convert generated extension bindings to use base::Value::CreateDeepCopy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 4 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 | « tools/json_schema_compiler/cc_generator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/util.cc
diff --git a/tools/json_schema_compiler/util.cc b/tools/json_schema_compiler/util.cc
index dcb44ecb1323accbc16cc370ccbabb7c48f1379e..d1a16261d2a85ac3a8b2c9b29aaa34da357eda78 100644
--- a/tools/json_schema_compiler/util.cc
+++ b/tools/json_schema_compiler/util.cc
@@ -160,12 +160,12 @@ void AddItemToList(const std::vector<char>& from, base::ListValue* out) {
void AddItemToList(const std::unique_ptr<base::Value>& from,
base::ListValue* out) {
- out->Append(from->DeepCopy());
+ out->Append(from->CreateDeepCopy());
}
void AddItemToList(const std::unique_ptr<base::DictionaryValue>& from,
base::ListValue* out) {
- out->Append(static_cast<base::Value*>(from->DeepCopy()));
+ out->Append(from->CreateDeepCopy());
}
std::string ValueTypeToString(base::Value::Type type) {
« no previous file with comments | « tools/json_schema_compiler/cc_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698