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

Unified Diff: runtime/observatory/lib/src/service/object.dart

Issue 1735993002: Fix bots: Only load class if the isolate is runnable. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/service/object.dart
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index 26535ecc7ceb38dff7b05b674715ca713d730973..ef744b978320dfdb2a98ce3f87dadc5b04b75195 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -389,8 +389,12 @@ abstract class HeapObject extends ServiceObject {
clazz = map['class'];
}
- // Load the full class object.
- clazz?.load();
+ // Load the full class object if the isolate is runnable.
+ if (clazz != null) {
+ if (clazz.owner.runnable) {
+ clazz.load();
+ }
+ }
if (mapIsRef) {
return;
@@ -1140,7 +1144,7 @@ class Isolate extends ServiceObjectOwner {
@observable bool running = false;
@observable bool idle = false;
@observable bool loading = true;
-
+ @observable bool runnable = false;
@observable bool ioEnabled = false;
final List<String> extensionRPCs = new List<String>();
@@ -1378,7 +1382,7 @@ class Isolate extends ServiceObjectOwner {
}
_loaded = true;
loading = false;
-
+ runnable = map['runnable'] == true;
_upgradeCollection(map, isolate);
originNumber = int.parse(map['_originNumber'], onError:(_) => null);
rootLibrary = map['rootLib'];
@@ -1861,6 +1865,7 @@ class ServiceEvent extends ServiceObject {
void _update(ObservableMap map, bool mapIsRef) {
_loaded = true;
_upgradeCollection(map, owner);
+
assert(map['isolate'] == null || owner == map['isolate']);
timestamp =
new DateTime.fromMillisecondsSinceEpoch(map['timestamp']);
« 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