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

Unified Diff: runtime/bin/service_object_patch.dart

Issue 307503002: Add processes to Observatory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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/bin/process_patch.dart ('k') | runtime/bin/vmservice/client/deployed/web/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/service_object_patch.dart
diff --git a/runtime/bin/service_object_patch.dart b/runtime/bin/service_object_patch.dart
index 52dc3eb478be4e0f6dfc4c64d864ba5a94fed1e8..d0056dffb360af9748a619cf95e7789af1cb95ff 100644
--- a/runtime/bin/service_object_patch.dart
+++ b/runtime/bin/service_object_patch.dart
@@ -10,7 +10,8 @@ final Map _servicePathMap = {
'sockets' : _socketsServiceObject,
'file' : {
'randomaccessfiles' : _randomAccessFilesServiceObject
- }
+ },
+ 'processes' : _processesServiceObject,
};
String _serviceObjectHandler(List<String> paths,
@@ -96,3 +97,18 @@ Map _randomAccessFilesServiceObject(args) {
};
}
+Map _processesServiceObject(args) {
+ if (args.length == 1) {
+ var process = _ProcessImpl._processes[int.parse(args.first)];
+ if (process == null) {
+ return {};
+ }
+ return process._toJSON(false);
+ }
+ return {
+ 'id': 'io/processes',
+ 'type': 'ProcessList',
+ 'members': _ProcessImpl._processes.values
+ .map((p) => p._toJSON(true)).toList(),
+ };
+}
« no previous file with comments | « runtime/bin/process_patch.dart ('k') | runtime/bin/vmservice/client/deployed/web/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698