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

Unified Diff: runtime/vm/json_stream.cc

Issue 823403004: Begin migrating the vm service from a rest-style interface to a json-rpc style interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: remove old-style standalone tests. Created 5 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 | « runtime/vm/json_stream.h ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_stream.cc
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index ecdd2ae20c7df5e4d7caa29f207e391f20ceb477..725ef488cfabc858819d0d203f526c878bf7189b 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -73,7 +73,46 @@ void JSONStream::Setup(Zone* zone,
Isolate* isolate = Isolate::Current();
ASSERT(isolate != NULL);
const char* isolate_name = isolate->name();
- OS::Print("Isolate %s processing service request /%s",
+ OS::Print("Isolate %s processing service request %s",
+ isolate_name, command_);
+ for (intptr_t i = 1; i < num_arguments(); i++) {
+ OS::Print("/%s", GetArgument(i));
+ }
+ OS::Print("\n");
+ setup_time_micros_ = OS::GetCurrentTimeMicros();
+ }
+}
+
+
+void JSONStream::SetupNew(Zone* zone,
+ Dart_Port reply_port,
+ const String& method,
+ const Array& option_keys,
+ const Array& option_values) {
+ set_reply_port(reply_port);
+ command_ = method.ToCString();
+
+ String& string_iterator = String::Handle();
+ if (option_keys.Length() > 0) {
+ const char** option_keys_native =
+ zone->Alloc<const char*>(option_keys.Length());
+ const char** option_values_native =
+ zone->Alloc<const char*>(option_keys.Length());
+ for (intptr_t i = 0; i < option_keys.Length(); i++) {
+ string_iterator ^= option_keys.At(i);
+ option_keys_native[i] =
+ zone->MakeCopyOfString(string_iterator.ToCString());
+ string_iterator ^= option_values.At(i);
+ option_values_native[i] =
+ zone->MakeCopyOfString(string_iterator.ToCString());
+ }
+ SetOptions(option_keys_native, option_values_native, option_keys.Length());
+ }
+ if (FLAG_trace_service) {
+ Isolate* isolate = Isolate::Current();
+ ASSERT(isolate != NULL);
+ const char* isolate_name = isolate->name();
+ OS::Print("Isolate %s processing service request %s",
isolate_name, command_);
for (intptr_t i = 1; i < num_arguments(); i++) {
OS::Print("/%s", GetArgument(i));
@@ -111,7 +150,7 @@ void JSONStream::PostReply() {
Isolate* isolate = Isolate::Current();
ASSERT(isolate != NULL);
const char* isolate_name = isolate->name();
- OS::Print("Isolate %s processed service request /%s",
+ OS::Print("Isolate %s processed service request %s",
isolate_name, command_);
for (intptr_t i = 1; i < num_arguments(); i++) {
OS::Print("/%s", GetArgument(i));
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698