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

Unified Diff: runtime/vm/isolate.cc

Issue 286903010: Add dart:io view to the observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index e97589beaf55a5462963d90c7b4ff1937cfbb62d..f27b3cd8f03c14e6fe8368499230ceb063689f71 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -976,19 +976,31 @@ void Isolate::PrintJSON(JSONStream* stream, bool ref) {
typeargsRef.AddProperty("id", "typearguments");
typeargsRef.AddProperty("name", "canonical type arguments");
}
+ bool is_io_enabled = false;
{
const GrowableObjectArray& libs =
GrowableObjectArray::Handle(object_store()->libraries());
intptr_t num_libs = libs.Length();
- Library &lib = Library::Handle();
+ Library& lib = Library::Handle();
+ String& name = String::Handle();
JSONArray lib_array(&jsobj, "libraries");
for (intptr_t i = 0; i < num_libs; i++) {
lib ^= libs.At(i);
+ name = lib.name();
Cutch 2014/05/23 05:51:37 We should test the case when an imported library i
Anders Johnsen 2014/05/23 05:59:13 I checked, and they are. Do you want a actual test
+ if (name.Equals(Symbols::DartIOLibName())) {
+ is_io_enabled = true;
+ }
ASSERT(!lib.IsNull());
lib_array.AddValue(lib);
}
}
+ {
+ JSONArray features_array(&jsobj, "features");
+ if (is_io_enabled) {
+ features_array.AddValue("io");
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698