Index: runtime/vm/service_event.cc |
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc |
index 94af480e8fc45697967b94685ea18487e82ede05..3ff1e1b001694192442314fd828c586d2e1fb15e 100644 |
--- a/runtime/vm/service_event.cc |
+++ b/runtime/vm/service_event.cc |
@@ -23,6 +23,8 @@ ServiceEvent::ServiceEvent(Isolate* isolate, EventKind event_kind) |
extension_rpc_(NULL), |
exception_(NULL), |
reload_error_(NULL), |
+ spawn_token_(NULL), |
+ spawn_error_(NULL), |
at_async_jump_(false), |
inspectee_(NULL), |
gc_stats_(NULL), |
@@ -69,6 +71,8 @@ const char* ServiceEvent::KindAsCString() const { |
return "ServiceExtensionAdded"; |
case kIsolateReload: |
return "IsolateReload"; |
+ case kIsolateSpawn: |
+ return "IsolateSpawn"; |
case kPauseStart: |
return "PauseStart"; |
case kPauseExit: |
@@ -122,6 +126,7 @@ const StreamInfo* ServiceEvent::stream_info() const { |
case kIsolateExit: |
case kIsolateUpdate: |
case kIsolateReload: |
+ case kIsolateSpawn: |
case kServiceExtensionAdded: |
return &Service::isolate_stream; |
@@ -183,6 +188,16 @@ void ServiceEvent::PrintJSON(JSONStream* js) const { |
jsobj.AddProperty("reloadError", *(reload_error())); |
} |
} |
+ if (kind() == kIsolateSpawn) { |
+ ASSERT(spawn_token() != NULL); |
+ jsobj.AddPropertyStr("spawnToken", *(spawn_token())); |
+ if (spawn_error_ == NULL) { |
+ jsobj.AddProperty("status", "success"); |
+ } else { |
+ jsobj.AddProperty("status", "failure"); |
+ jsobj.AddPropertyStr("spawnError", *(spawn_error())); |
+ } |
+ } |
if (kind() == kServiceExtensionAdded) { |
ASSERT(extension_rpc_ != NULL); |
jsobj.AddProperty("extensionRPC", extension_rpc_->ToCString()); |