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

Unified Diff: runtime/vm/service_event.cc

Issue 1527793004: Provide list of service protocol extensions in isolate and emit an event when one is registered (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/developer/extension.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 bad3583c674a793ef2d7cb66b669b512287826d8..280efc08d458d9ba706167dfe5d4f2009c92c9a7 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -40,6 +40,7 @@ ServiceEvent::ServiceEvent(Isolate* isolate, EventKind event_kind)
embedder_stream_id_(NULL),
breakpoint_(NULL),
top_frame_(NULL),
+ extension_rpc_(NULL),
exception_(NULL),
async_continuation_(NULL),
at_async_jump_(false),
@@ -62,6 +63,7 @@ ServiceEvent::ServiceEvent(const DebuggerEvent* debugger_event)
kind_(TranslateEventKind(debugger_event->type())),
breakpoint_(NULL),
top_frame_(NULL),
+ extension_rpc_(NULL),
exception_(NULL),
async_continuation_(NULL),
inspectee_(NULL),
@@ -101,6 +103,8 @@ const char* ServiceEvent::KindAsCString() const {
return "IsolateExit";
case kIsolateUpdate:
return "IsolateUpdate";
+ case kServiceExtensionAdded:
+ return "ServiceExtensionAdded";
case kPauseStart:
return "PauseStart";
case kPauseExit:
@@ -147,6 +151,7 @@ const char* ServiceEvent::stream_id() const {
case kIsolateRunnable:
case kIsolateExit:
case kIsolateUpdate:
+ case kServiceExtensionAdded:
return Service::isolate_stream.id();
case kPauseStart:
@@ -181,6 +186,10 @@ const char* ServiceEvent::stream_id() const {
void ServiceEvent::PrintJSON(JSONStream* js) const {
JSONObject jsobj(js);
PrintJSONHeader(&jsobj);
+ if (kind() == kServiceExtensionAdded) {
+ ASSERT(extension_rpc_ != NULL);
+ jsobj.AddProperty("extensionRPC", extension_rpc_->ToCString());
+ }
if (kind() == kPauseBreakpoint) {
JSONArray jsarr(&jsobj, "pauseBreakpoints");
// TODO(rmacnak): If we are paused at more than one breakpoint,
« no previous file with comments | « runtime/vm/service_event.h ('k') | sdk/lib/developer/extension.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698