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

Unified Diff: runtime/vm/json_stream.cc

Issue 22238002: Expose arguments and options to handlers through JSONStream (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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: runtime/vm/json_stream.cc
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index 045fced739376162c3f6017e002182b4a179a67f..b3a61d36c62a8841e9cc365a82aabe8f9c74b976 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -13,6 +13,11 @@ JSONStream::JSONStream(TextBuffer* buffer) {
ASSERT(buffer != NULL);
buffer_ = buffer;
open_objects_ = 0;
+ arguments_ = NULL;
+ num_arguments_ = 0;
+ option_keys_ = NULL;
+ option_values_ = NULL;
+ num_options_ = 0;
}
@@ -147,6 +152,21 @@ void JSONStream::PrintfProperty(const char* name, const char* format, ...) {
}
+void JSONStream::SetArguments(const char** arguments, intptr_t num_arguments) {
+ arguments_ = arguments;
+ num_arguments_ = num_arguments;
+}
+
+
+void JSONStream::SetOptions(const char** option_keys,
+ const char** option_values,
+ intptr_t num_options) {
+ option_keys_ = option_keys;
+ option_values_ = option_values;
+ num_options_ = num_options;
+}
+
+
void JSONStream::PrintProperty(const char* name, const Object& o, bool ref) {
PrintPropertyName(name);
PrintValue(o, ref);
« runtime/vm/json_stream.h ('K') | « runtime/vm/json_stream.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698