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

Unified Diff: runtime/platform/json.cc

Issue 13006007: Added string appending to TextBuffer, removed STL use in vm_stats_impl. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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
« runtime/platform/json.h ('K') | « runtime/platform/json.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/json.cc
===================================================================
--- runtime/platform/json.cc (revision 20477)
+++ runtime/platform/json.cc (working copy)
@@ -545,6 +545,19 @@
}
+void TextBuffer::AddString(const char* s) {
+ Printf("%s", s);
+}
+
+
+void TextBuffer::AddEscapedString(const char* s) {
+ intptr_t len = strlen(s);
+ for (int i = 0; i < len; i++) {
+ AddEscapedChar(s[i]);
+ }
+}
+
+
void TextBuffer::EnsureCapacity(intptr_t len) {
intptr_t remaining = buf_size_ - msg_len_;
if (remaining <= len) {
« runtime/platform/json.h ('K') | « runtime/platform/json.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698