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

Unified Diff: runtime/vm/service_event.cc

Issue 2072543002: First cut at _spawnUri rpc in the vm service. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review Created 4 years, 5 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') | sdk/lib/vmservice/message.dart » ('j') | 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 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());
« no previous file with comments | « runtime/vm/service_event.h ('k') | sdk/lib/vmservice/message.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698