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

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

Issue 1390343002: Reload an isolate once it is runnable. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
« 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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 if (eventIsolate == null) { 667 if (eventIsolate == null) {
668 event = new ServiceObject._fromMap(vm, map); 668 event = new ServiceObject._fromMap(vm, map);
669 } else { 669 } else {
670 // getFromMap creates the Isolate if it hasn't been seen already. 670 // getFromMap creates the Isolate if it hasn't been seen already.
671 var isolate = getFromMap(map['isolate']); 671 var isolate = getFromMap(map['isolate']);
672 event = new ServiceObject._fromMap(isolate, map); 672 event = new ServiceObject._fromMap(isolate, map);
673 if (event.kind == ServiceEvent.kIsolateExit) { 673 if (event.kind == ServiceEvent.kIsolateExit) {
674 _isolateCache.remove(isolate.id); 674 _isolateCache.remove(isolate.id);
675 _buildIsolateList(); 675 _buildIsolateList();
676 } 676 }
677 if (event.kind == ServiceEvent.kIsolateRunnable) {
678 // Force reload once the isolate becomes runnable so that we
679 // update the root library.
680 isolate.reload();
681 }
677 } 682 }
678 var eventStream = _eventStreams[streamId]; 683 var eventStream = _eventStreams[streamId];
679 if (eventStream != null) { 684 if (eventStream != null) {
680 eventStream.addEvent(event); 685 eventStream.addEvent(event);
681 } else { 686 } else {
682 Logger.root.warning("Ignoring unexpected event on stream '${streamId}'"); 687 Logger.root.warning("Ignoring unexpected event on stream '${streamId}'");
683 } 688 }
684 } 689 }
685 690
686 int _compareIsolates(Isolate a, Isolate b) { 691 int _compareIsolates(Isolate a, Isolate b) {
(...skipping 3247 matching lines...) Expand 10 before | Expand all | Expand 10 after
3934 var v = list[i]; 3939 var v = list[i];
3935 if ((v is ObservableMap) && _isServiceMap(v)) { 3940 if ((v is ObservableMap) && _isServiceMap(v)) {
3936 list[i] = owner.getFromMap(v); 3941 list[i] = owner.getFromMap(v);
3937 } else if (v is ObservableList) { 3942 } else if (v is ObservableList) {
3938 _upgradeObservableList(v, owner); 3943 _upgradeObservableList(v, owner);
3939 } else if (v is ObservableMap) { 3944 } else if (v is ObservableMap) {
3940 _upgradeObservableMap(v, owner); 3945 _upgradeObservableMap(v, owner);
3941 } 3946 }
3942 } 3947 }
3943 } 3948 }
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