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

Unified Diff: runtime/vm/service_event.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/service_event.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service_event.cc
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc
index 42dd2022f53e4197148edebd27d1afa1538bb893..1023043f73de0df196e7bd6ad5d64c88f9d25654 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -91,6 +91,8 @@ ServiceEvent::ServiceEvent(const DebuggerEvent* debugger_event)
const char* ServiceEvent::KindAsCString() const {
switch (kind()) {
+ case kVMUpdate:
+ return "VMUpdate";
case kIsolateStart:
return "IsolateStart";
case kIsolateRunnable:
@@ -138,6 +140,9 @@ const char* ServiceEvent::KindAsCString() const {
const char* ServiceEvent::stream_id() const {
switch (kind()) {
+ case kVMUpdate:
+ return Service::vm_stream.id();
+
case kIsolateStart:
case kIsolateRunnable:
case kIsolateExit:
@@ -234,7 +239,11 @@ void ServiceEvent::PrintJSONHeader(JSONObject* jsobj) const {
ASSERT(jsobj != NULL);
jsobj->AddProperty("type", "Event");
jsobj->AddProperty("kind", KindAsCString());
- jsobj->AddProperty("isolate", isolate());
+ if (kind() == kVMUpdate) {
+ jsobj->AddPropertyVM("vm");
+ } else {
+ jsobj->AddProperty("isolate", isolate());
+ }
ASSERT(timestamp_ != -1);
jsobj->AddPropertyTimeMillis("timestamp", timestamp_);
}
« no previous file with comments | « runtime/vm/service_event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698