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

Unified Diff: third_party/inspector_protocol/lib/ErrorSupport_cpp.template

Issue 2660503002: Adapt StringBuilder's append and toString methods via StringUtil helper. (Closed)
Patch Set: Corrected the revision number... :-/ Created 3 years, 11 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 | « third_party/inspector_protocol/README.v8 ('k') | third_party/inspector_protocol/lib/Parser_cpp.template » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/inspector_protocol/lib/ErrorSupport_cpp.template
diff --git a/third_party/inspector_protocol/lib/ErrorSupport_cpp.template b/third_party/inspector_protocol/lib/ErrorSupport_cpp.template
index e4ae0c4e47ef466e9ecdf5aff470053b4268eaf9..2108262a12b623ca01cf3fa84bdd0598cf76f8ac 100644
--- a/third_party/inspector_protocol/lib/ErrorSupport_cpp.template
+++ b/third_party/inspector_protocol/lib/ErrorSupport_cpp.template
@@ -32,12 +32,12 @@ void ErrorSupport::addError(const String& error)
StringBuilder builder;
for (size_t i = 0; i < m_path.size(); ++i) {
if (i)
- builder.append('.');
- builder.append(m_path[i]);
+ StringUtil::builderAppend(builder, '.');
+ StringUtil::builderAppend(builder, m_path[i]);
}
- builder.append(": ");
- builder.append(error);
- m_errors.push_back(builder.toString());
+ StringUtil::builderAppend(builder, ": ");
+ StringUtil::builderAppend(builder, error);
+ m_errors.push_back(StringUtil::builderToString(builder));
}
bool ErrorSupport::hasErrors()
@@ -50,10 +50,10 @@ String ErrorSupport::errors()
StringBuilder builder;
for (size_t i = 0; i < m_errors.size(); ++i) {
if (i)
- builder.append("; ");
- builder.append(m_errors[i]);
+ StringUtil::builderAppend(builder, "; ");
+ StringUtil::builderAppend(builder, m_errors[i]);
}
- return builder.toString();
+ return StringUtil::builderToString(builder);
}
{% for namespace in config.protocol.namespace %}
« no previous file with comments | « third_party/inspector_protocol/README.v8 ('k') | third_party/inspector_protocol/lib/Parser_cpp.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698