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

Unified Diff: third_party/inspector_protocol/lib/Parser_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
Index: third_party/inspector_protocol/lib/Parser_cpp.template
diff --git a/third_party/inspector_protocol/lib/Parser_cpp.template b/third_party/inspector_protocol/lib/Parser_cpp.template
index 11a60639dfd0dfbef8ad0618caa6163d1063c34a..4bf6bebc467eb4b0f5fdcc59f40e3d7d88f83b8a 100644
--- a/third_party/inspector_protocol/lib/Parser_cpp.template
+++ b/third_party/inspector_protocol/lib/Parser_cpp.template
@@ -337,7 +337,7 @@ bool decodeString(const Char* start, const Char* end, StringBuilder* output)
while (start < end) {
uint16_t c = *start++;
if ('\\' != c) {
- output->append(c);
+ StringUtil::builderAppend(*output, c);
continue;
}
if (start == end)
@@ -382,7 +382,7 @@ bool decodeString(const Char* start, const Char* end, StringBuilder* output)
default:
return false;
}
- output->append(c);
+ StringUtil::builderAppend(*output, c);
}
return true;
}
@@ -400,7 +400,7 @@ bool decodeString(const Char* start, const Char* end, String* output)
StringUtil::builderReserve(buffer, end - start);
if (!decodeString(start, end, &buffer))
return false;
- *output = buffer.toString();
+ *output = StringUtil::builderToString(buffer);
return true;
}
« no previous file with comments | « third_party/inspector_protocol/lib/ErrorSupport_cpp.template ('k') | third_party/inspector_protocol/lib/Values_cpp.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698