Index: tools/gn/trace.cc |
diff --git a/tools/gn/trace.cc b/tools/gn/trace.cc |
index aa73eba93b526fa74e0eabbd8c90e1b15c44cb96..18082c4776b4913d43bec830f2018690296313a4 100644 |
--- a/tools/gn/trace.cc |
+++ b/tools/gn/trace.cc |
@@ -241,7 +241,7 @@ void SaveTraces(const base::FilePath& file_name) { |
out << ",\"dur\":" << item.delta().InMicroseconds(); |
quote_buffer.resize(0); |
- base::JsonDoubleQuote(item.name(), true, "e_buffer); |
+ base::EscapeJSONString(item.name(), true, "e_buffer); |
out << ",\"name\":" << quote_buffer; |
out << ",\"cat\":"; |
@@ -270,13 +270,13 @@ void SaveTraces(const base::FilePath& file_name) { |
bool needs_comma = false; |
if (!item.toolchain().empty()) { |
quote_buffer.resize(0); |
- base::JsonDoubleQuote(item.toolchain(), true, "e_buffer); |
+ base::EscapeJSONString(item.toolchain(), true, "e_buffer); |
out << "\"toolchain\":" << quote_buffer; |
needs_comma = true; |
} |
if (!item.cmdline().empty()) { |
quote_buffer.resize(0); |
- base::JsonDoubleQuote(item.cmdline(), true, "e_buffer); |
+ base::EscapeJSONString(item.cmdline(), true, "e_buffer); |
if (needs_comma) |
out << ","; |
out << "\"cmdline\":" << quote_buffer; |