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

Unified Diff: runtime/observatory/tests/service/test_helper.dart

Issue 1453983002: Add RPC and UI for reachable size of an object / all instances of a class. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/observatory/tests/service/reachable_size_test.dart ('k') | runtime/vm/object_graph.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/test_helper.dart
diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart
index 6248b43ffafac9a629a77b36f186c5251b118059..58de4e660f99ff402c5d1a2dd1bc5573690a900f 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -319,6 +319,17 @@ Future<Class> getClassFromRootLib(Isolate isolate, String className) async {
}
+Future<Instance> rootLibraryFieldValue(Isolate isolate,
+ String fieldName) async {
+ Library rootLib = await isolate.rootLibrary.load();
+ Field field = rootLib.variables.singleWhere((v) => v.name == fieldName);
+ await field.load();
+ Instance value = field.staticValue;
+ await value.load();
+ return value;
+}
+
+
/// Runs [tests] in sequence, each of which should take an [Isolate] and
/// return a [Future]. Code for setting up state can run before and/or
/// concurrently with the tests. Uses [mainArgs] to determine whether
« no previous file with comments | « runtime/observatory/tests/service/reachable_size_test.dart ('k') | runtime/vm/object_graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698