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}); |
+ } |
} |
} |