OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of service; | 5 part of service; |
6 | 6 |
7 /// Helper function for canceling a Future<StreamSubscription>. | 7 /// Helper function for canceling a Future<StreamSubscription>. |
8 Future cancelFutureSubscription( | 8 Future cancelFutureSubscription( |
9 Future<StreamSubscription> subscriptionFuture) async { | 9 Future<StreamSubscription> subscriptionFuture) async { |
10 if (subscriptionFuture != null) { | 10 if (subscriptionFuture != null) { |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 | 827 |
828 Future<ObservableMap> _fetchDirect() async { | 828 Future<ObservableMap> _fetchDirect() async { |
829 if (!loaded) { | 829 if (!loaded) { |
830 // The vm service relies on these events to keep the VM and | 830 // The vm service relies on these events to keep the VM and |
831 // Isolate types up to date. | 831 // Isolate types up to date. |
832 try { | 832 try { |
833 await listenEventStream(kVMStream, _dispatchEventToIsolate); | 833 await listenEventStream(kVMStream, _dispatchEventToIsolate); |
834 await listenEventStream(kIsolateStream, _dispatchEventToIsolate); | 834 await listenEventStream(kIsolateStream, _dispatchEventToIsolate); |
835 await listenEventStream(kDebugStream, _dispatchEventToIsolate); | 835 await listenEventStream(kDebugStream, _dispatchEventToIsolate); |
836 await listenEventStream(_kGraphStream, _dispatchEventToIsolate); | 836 await listenEventStream(_kGraphStream, _dispatchEventToIsolate); |
837 } on FakeVMRpcException catch (e) { | 837 } on FakeVMRpcException catch (_) { |
838 // ignore FakeVMRpcExceptions here. | 838 // ignore FakeVMRpcExceptions here. |
839 } | 839 } |
840 } | 840 } |
841 return await invokeRpcNoUpgrade('getVM', {}); | 841 return await invokeRpcNoUpgrade('getVM', {}); |
842 } | 842 } |
843 | 843 |
844 Future setName(String newName) { | 844 Future setName(String newName) { |
845 return invokeRpc('setVMName', { 'name': newName }); | 845 return invokeRpc('setVMName', { 'name': newName }); |
846 } | 846 } |
847 | 847 |
848 Future<ServiceObject> getFlagList() { | 848 Future<ServiceObject> getFlagList() { |
(...skipping 3149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3998 var v = list[i]; | 3998 var v = list[i]; |
3999 if ((v is ObservableMap) && _isServiceMap(v)) { | 3999 if ((v is ObservableMap) && _isServiceMap(v)) { |
4000 list[i] = owner.getFromMap(v); | 4000 list[i] = owner.getFromMap(v); |
4001 } else if (v is ObservableList) { | 4001 } else if (v is ObservableList) { |
4002 _upgradeObservableList(v, owner); | 4002 _upgradeObservableList(v, owner); |
4003 } else if (v is ObservableMap) { | 4003 } else if (v is ObservableMap) { |
4004 _upgradeObservableMap(v, owner); | 4004 _upgradeObservableMap(v, owner); |
4005 } | 4005 } |
4006 } | 4006 } |
4007 } | 4007 } |
OLD | NEW |