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

Unified Diff: runtime/platform/json.cc

Issue 170943003: Allow for embedder provided service request handlers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | « runtime/platform/json.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/json.cc
diff --git a/runtime/platform/json.cc b/runtime/platform/json.cc
index 31ad4188f7162196125c79c97d1613182a85a0b3..a406e7a5728bf96303387fbaa070c0e2af6f55a0 100644
--- a/runtime/platform/json.cc
+++ b/runtime/platform/json.cc
@@ -510,6 +510,15 @@ void TextBuffer::Clear() {
}
+const char* TextBuffer::Steal() {
+ const char* r = buf_;
+ buf_ = NULL;
+ buf_size_ = 0;
+ msg_len_ = 0;
+ return r;
+}
+
+
void TextBuffer::AddChar(char ch) {
EnsureCapacity(sizeof(ch));
buf_[msg_len_] = ch;
« no previous file with comments | « runtime/platform/json.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698