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

Side by Side Diff: runtime/observatory/lib/src/service/object.dart

Issue 1406343004: Allow for FakeVMRpcExceptions when listening for streams (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 } 822 }
823 823
824 Future restart() { 824 Future restart() {
825 return invokeRpc('_restartVM', {}); 825 return invokeRpc('_restartVM', {});
826 } 826 }
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 await listenEventStream(kVMStream, _dispatchEventToIsolate); 832 try {
833 await listenEventStream(kIsolateStream, _dispatchEventToIsolate); 833 await listenEventStream(kVMStream, _dispatchEventToIsolate);
834 await listenEventStream(kDebugStream, _dispatchEventToIsolate); 834 await listenEventStream(kIsolateStream, _dispatchEventToIsolate);
835 await listenEventStream(_kGraphStream, _dispatchEventToIsolate); 835 await listenEventStream(kDebugStream, _dispatchEventToIsolate);
836 await listenEventStream(_kGraphStream, _dispatchEventToIsolate);
837 } on FakeVMRpcException catch (e) {
838 // ignore FakeVMRpcExceptions here.
839 }
836 } 840 }
837 return await invokeRpcNoUpgrade('getVM', {}); 841 return await invokeRpcNoUpgrade('getVM', {});
838 } 842 }
839 843
840 Future setName(String newName) { 844 Future setName(String newName) {
841 return invokeRpc('setVMName', { 'name': newName }); 845 return invokeRpc('setVMName', { 'name': newName });
842 } 846 }
843 847
844 Future<ServiceObject> getFlagList() { 848 Future<ServiceObject> getFlagList() {
845 return invokeRpc('getFlagList', {}); 849 return invokeRpc('getFlagList', {});
(...skipping 3148 matching lines...) Expand 10 before | Expand all | Expand 10 after
3994 var v = list[i]; 3998 var v = list[i];
3995 if ((v is ObservableMap) && _isServiceMap(v)) { 3999 if ((v is ObservableMap) && _isServiceMap(v)) {
3996 list[i] = owner.getFromMap(v); 4000 list[i] = owner.getFromMap(v);
3997 } else if (v is ObservableList) { 4001 } else if (v is ObservableList) {
3998 _upgradeObservableList(v, owner); 4002 _upgradeObservableList(v, owner);
3999 } else if (v is ObservableMap) { 4003 } else if (v is ObservableMap) {
4000 _upgradeObservableMap(v, owner); 4004 _upgradeObservableMap(v, owner);
4001 } 4005 }
4002 } 4006 }
4003 } 4007 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698