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

Unified Diff: runtime/observatory/lib/src/repositories/isolate.dart

Issue 2980733003: Introduced support for external services registration in the ServiceProtocol (Closed)
Patch Set: Address comments Created 3 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
Index: runtime/observatory/lib/src/repositories/isolate.dart
diff --git a/runtime/observatory/lib/src/repositories/isolate.dart b/runtime/observatory/lib/src/repositories/isolate.dart
index 9294c7d40461a4297a9cea973e9a23b399a5c409..d86365c4d347577ca11e318f868c064df8df4a7f 100644
--- a/runtime/observatory/lib/src/repositories/isolate.dart
+++ b/runtime/observatory/lib/src/repositories/isolate.dart
@@ -5,6 +5,15 @@
part of repositories;
class IsolateRepository extends M.IsolateRepository {
+ final S.VM _vm;
+
+ Iterable<M.Service> get reloadSourcesServices =>
+ _vm.services.where((S.Service s) => s.service == 'reloadSources');
+
+ IsolateRepository(this._vm) {
+ assert(_vm == null);
+ }
+
Future<M.Isolate> get(M.IsolateRef i) async {
S.Isolate isolate = i as S.Isolate;
assert(isolate != null);
@@ -16,9 +25,15 @@ class IsolateRepository extends M.IsolateRepository {
return isolate;
}
- Future reloadSources(M.IsolateRef i) async {
- S.Isolate isolate = i as S.Isolate;
- assert(isolate != null);
- await isolate.reloadSources();
+ Future reloadSources(M.IsolateRef i, {M.Service service}) async {
+ if (service == null) {
+ S.Isolate isolate = i as S.Isolate;
+ assert(isolate != null);
+ await isolate.reloadSources();
+ } else {
+ S.Service srv = service as S.Service;
+ assert(srv != null);
+ await _vm.invokeRpcNoUpgrade(srv.method, {'isolateId': i.id});
+ }
}
}
« no previous file with comments | « runtime/observatory/lib/src/repositories/event.dart ('k') | runtime/observatory/lib/src/service/object.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698