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 1371193005: VM restart + shutdown fixes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: more code review Created 5 years, 2 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 unified diff | Download patch
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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 }); 796 });
797 } 797 }
798 798
799 void _dispatchEventToIsolate(ServiceEvent event) { 799 void _dispatchEventToIsolate(ServiceEvent event) {
800 var isolate = event.isolate; 800 var isolate = event.isolate;
801 if (isolate != null) { 801 if (isolate != null) {
802 isolate._onEvent(event); 802 isolate._onEvent(event);
803 } 803 }
804 } 804 }
805 805
806 Future restart() {
807 return invokeRpc('_restartVM', {});
808 }
809
806 Future<ObservableMap> _fetchDirect() async { 810 Future<ObservableMap> _fetchDirect() async {
807 if (!loaded) { 811 if (!loaded) {
808 // The vm service relies on these events to keep the VM and 812 // The vm service relies on these events to keep the VM and
809 // Isolate types up to date. 813 // Isolate types up to date.
810 await listenEventStream(kIsolateStream, _dispatchEventToIsolate); 814 await listenEventStream(kIsolateStream, _dispatchEventToIsolate);
811 await listenEventStream(kDebugStream, _dispatchEventToIsolate); 815 await listenEventStream(kDebugStream, _dispatchEventToIsolate);
812 await listenEventStream(_kGraphStream, _dispatchEventToIsolate); 816 await listenEventStream(_kGraphStream, _dispatchEventToIsolate);
813 } 817 }
814 return await invokeRpcNoUpgrade('getVM', {}); 818 return await invokeRpcNoUpgrade('getVM', {});
815 } 819 }
(...skipping 3112 matching lines...) Expand 10 before | Expand all | Expand 10 after
3928 var v = list[i]; 3932 var v = list[i];
3929 if ((v is ObservableMap) && _isServiceMap(v)) { 3933 if ((v is ObservableMap) && _isServiceMap(v)) {
3930 list[i] = owner.getFromMap(v); 3934 list[i] = owner.getFromMap(v);
3931 } else if (v is ObservableList) { 3935 } else if (v is ObservableList) {
3932 _upgradeObservableList(v, owner); 3936 _upgradeObservableList(v, owner);
3933 } else if (v is ObservableMap) { 3937 } else if (v is ObservableMap) {
3934 _upgradeObservableMap(v, owner); 3938 _upgradeObservableMap(v, owner);
3935 } 3939 }
3936 } 3940 }
3937 } 3941 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/debugger.html ('k') | runtime/observatory/tests/service/vm_restart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698