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

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: Add missing files. 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/service/object.dart ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 95d7ffcd41340a94d5384da45415a8d402cd6162..04f5b573a12248b53dc219dcaeaa3d855030bc01 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -971,19 +971,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();
+ 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");
+ }
+ }
}
« no previous file with comments | « runtime/bin/vmservice/client/lib/src/service/object.dart ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698