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

Unified Diff: runtime/vm/json_stream.cc

Issue 1398823002: We can now name the current VM using the service protocol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: more Created 5 years, 2 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/service.h » ('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 b5da5ddc01066981ab98411afdcf64be1c487cf2..2f92daa709accae3701713cb888e7425715d1677 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -10,8 +10,8 @@
#include "vm/message.h"
#include "vm/metrics.h"
#include "vm/object.h"
-#include "vm/service_event.h"
#include "vm/service.h"
+#include "vm/service_event.h"
#include "vm/timeline.h"
#include "vm/unicode.h"
@@ -443,6 +443,12 @@ void JSONStream::PrintValue(TimelineEvent* timeline_event) {
}
+void JSONStream::PrintValueVM(bool ref) {
+ PrintCommaIfNeeded();
+ Service::PrintJSONForVM(this, ref);
+}
+
+
void JSONStream::PrintServiceId(const Object& o) {
ASSERT(id_zone_ != NULL);
PrintProperty("id", id_zone_->GetServiceId(o));
@@ -594,6 +600,12 @@ void JSONStream::PrintProperty(const char* name, const Object& o, bool ref) {
}
+void JSONStream::PrintPropertyVM(const char* name, bool ref) {
+ PrintPropertyName(name);
+ PrintValueVM(ref);
+}
+
+
void JSONStream::PrintPropertyName(const char* name) {
ASSERT(name != NULL);
PrintCommaIfNeeded();
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698