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

Unified Diff: runtime/vm/service.cc

Issue 895093002: Add getClassList RPC (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/class_table.cc ('k') | runtime/vm/service/service.idl » ('j') | 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 c2a98074d645b9f52d85ef489559464b764ea36b..e9b0cc70418b9b21e0a5778841030de924189d32 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -2115,9 +2115,7 @@ static bool HandleIsolateGetInstances(Isolate* isolate, JSONStream* js) {
static bool HandleClasses(Isolate* isolate, JSONStream* js) {
if (js->num_arguments() == 1) {
- ClassTable* table = isolate->class_table();
- JSONObject jsobj(js);
- table->PrintToJSONObject(&jsobj);
+ PrintError(js, "Invalid number of arguments.");
return true;
}
ASSERT(js->num_arguments() >= 2);
@@ -2945,6 +2943,14 @@ static bool HandleIsolateGetObject(Isolate* isolate, JSONStream* js) {
}
+static bool HandleIsolateGetClassList(Isolate* isolate, JSONStream* js) {
+ ClassTable* table = isolate->class_table();
+ JSONObject jsobj(js);
+ table->PrintToJSONObject(&jsobj);
+ return true;
+}
+
+
static IsolateMessageHandlerEntry isolate_handlers_new[] = {
{ "getObject", HandleIsolateGetObject },
{ "getBreakpoints", HandleIsolateGetBreakpoints },
@@ -2964,6 +2970,7 @@ static IsolateMessageHandlerEntry isolate_handlers_new[] = {
{ "getInboundReferences", HandleIsolateGetInboundReferences },
{ "getInstances", HandleIsolateGetInstances },
{ "requestHeapSnapshot", HandleIsolateRequestHeapSnapshot },
+ { "getClassList", HandleIsolateGetClassList },
};
« no previous file with comments | « runtime/vm/class_table.cc ('k') | runtime/vm/service/service.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698