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

Unified Diff: runtime/bin/vmservice/client/lib/src/service/object.dart

Issue 271153002: Add pause/resume for isolates in vmservice/observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/elements/script_view.html ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmservice/client/lib/src/service/object.dart
diff --git a/runtime/bin/vmservice/client/lib/src/service/object.dart b/runtime/bin/vmservice/client/lib/src/service/object.dart
index 0a8e54dbdbc815fe7b90e0243658092353457c24..fc34a83b24ac8378d8612e2b52e043b5ab354a7d 100644
--- a/runtime/bin/vmservice/client/lib/src/service/object.dart
+++ b/runtime/bin/vmservice/client/lib/src/service/object.dart
@@ -37,6 +37,8 @@ abstract class ServiceObject extends Observable {
/// Has this object been fully loaded?
bool get loaded => _loaded;
bool _loaded = false;
+ // TODO(turnidge): Make loaded observable and get rid of loading
+ // from Isolate.
/// Is this object cacheable? That is, is it impossible for the [id]
/// of this object to change?
@@ -487,15 +489,17 @@ class TagProfile {
class Isolate extends ServiceObjectOwner {
@reflectable VM get vm => owner;
@reflectable Isolate get isolate => this;
- @observable ObservableMap counters = toObservable(new ObservableMap());
+ @observable ObservableMap counters = new ObservableMap();
String get link => _id;
String get hashLink => '#/$_id';
- @observable bool pausedOnStart = false;
- @observable bool pausedOnExit = false;
+ @observable ServiceMap pauseEvent = null;
+ bool get _isPaused => pauseEvent != null;
+
@observable bool running = false;
@observable bool idle = false;
+ @observable bool loading = true;
Map<String,ServiceObject> _cache = new Map<String,ServiceObject>();
final TagProfile tagProfile = new TagProfile(20);
@@ -637,6 +641,7 @@ class Isolate extends ServiceObjectOwner {
return;
}
_loaded = true;
+ loading = false;
_upgradeCollection(map, isolate);
if (map['rootLib'] == null ||
map['timers'] == null ||
@@ -695,10 +700,9 @@ class Isolate extends ServiceObjectOwner {
oldHeapCapacity = map['heap']['capacityOld'];
// Isolate status
- pausedOnStart = map['pausedOnStart'];
- pausedOnExit = map['pausedOnExit'];
- running = map['topFrame'] != null;
- idle = !pausedOnStart && !pausedOnExit && !running;
+ pauseEvent = map['pauseEvent'];
+ running = (!_isPaused && map['topFrame'] != null);
+ idle = (!_isPaused && map['topFrame'] == null);
error = map['error'];
libraries.clear();
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/elements/script_view.html ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698