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

Unified Diff: runtime/vm/service.cc

Issue 1189543003: Ports page for isolates (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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
« runtime/observatory/web/main.dart ('K') | « runtime/vm/port.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index f5aab5dbf4e6dc648d1ff6f8ec5633633eb8e9ed..25de978a1f27f1f953df77fde8f2dc7294e240e8 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -2436,6 +2436,19 @@ static bool GetObjectByAddress(Isolate* isolate, JSONStream* js) {
}
+static const MethodParameter* get_ports_params[] = {
+ ISOLATE_PARAMETER,
+ NULL,
+};
+
+
+static bool GetPorts(Isolate* isolate, JSONStream* js) {
+ MessageHandler* message_handler = isolate->message_handler();
+ PortMap::PrintPortsForMessageHandler(message_handler, js);
+ return true;
+}
+
+
static bool RespondWithMalformedJson(Isolate* isolate,
JSONStream* js) {
JSONObject jsobj(js);
@@ -2793,6 +2806,8 @@ static ServiceMethodDescriptor service_methods_[] = {
get_object_params },
{ "_getObjectByAddress", GetObjectByAddress,
get_object_by_address_params },
+ { "_getPorts", GetPorts,
+ get_ports_params },
{ "_getRetainedSize", GetRetainedSize,
get_retained_size_params },
{ "_getRetainingPath", GetRetainingPath,
« runtime/observatory/web/main.dart ('K') | « runtime/vm/port.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698