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

Unified Diff: runtime/vm/flags.cc

Issue 1149403007: Rework the format of the FlagList response. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/observatory/lib/src/elements/flag_list.html ('k') | runtime/vm/service/service.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flags.cc
diff --git a/runtime/vm/flags.cc b/runtime/vm/flags.cc
index b9cda6a584607ecdf86bbb25706902d2f4be5dfe..f38639fff5b42563b23876e1a247c8ca56735a0b 100644
--- a/runtime/vm/flags.cc
+++ b/runtime/vm/flags.cc
@@ -427,6 +427,7 @@ void Flags::PrintFlagToJSONArray(JSONArray* jsarr, const Flag* flag) {
JSONObject jsflag(jsarr);
jsflag.AddProperty("name", flag->name_);
jsflag.AddProperty("comment", flag->comment_);
+ jsflag.AddProperty("modified", flag->changed_);
switch (flag->type_) {
case Flag::kBoolean: {
jsflag.AddProperty("_flagType", "Bool");
@@ -463,23 +464,9 @@ void Flags::PrintFlagToJSONArray(JSONArray* jsarr, const Flag* flag) {
void Flags::PrintJSON(JSONStream* js) {
JSONObject jsobj(js);
jsobj.AddProperty("type", "FlagList");
- {
- JSONArray jsarr(&jsobj, "unmodifiedFlags");
- for (intptr_t i = 0; i < num_flags_; ++i) {
- Flag* flag = flags_[i];
- if (!flag->changed_) {
- PrintFlagToJSONArray(&jsarr, flag);
- }
- }
- }
- {
- JSONArray jsarr(&jsobj, "modifiedFlags");
- for (intptr_t i = 0; i < num_flags_; ++i) {
- Flag* flag = flags_[i];
- if (flag->changed_) {
- PrintFlagToJSONArray(&jsarr, flag);
- }
- }
+ JSONArray jsarr(&jsobj, "flags");
+ for (intptr_t i = 0; i < num_flags_; ++i) {
+ PrintFlagToJSONArray(&jsarr, flags_[i]);
}
}
« no previous file with comments | « runtime/observatory/lib/src/elements/flag_list.html ('k') | runtime/vm/service/service.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698