Index: runtime/vm/flags.cc |
diff --git a/runtime/vm/flags.cc b/runtime/vm/flags.cc |
index e9bd84fbb4371a33de52de79545dbb0a813c4012..a2a63f7991020b81f566ea290f2fcb00acbbd34c 100644 |
--- a/runtime/vm/flags.cc |
+++ b/runtime/vm/flags.cc |
@@ -456,6 +456,9 @@ void Flags::PrintFlags() { |
void Flags::PrintFlagToJSONArray(JSONArray* jsarr, const Flag* flag) { |
+ if (!FLAG_support_service) { |
+ return; |
+ } |
if (flag->IsUnrecognized() || flag->type_ == Flag::kFunc) { |
return; |
} |
@@ -497,6 +500,9 @@ void Flags::PrintFlagToJSONArray(JSONArray* jsarr, const Flag* flag) { |
void Flags::PrintJSON(JSONStream* js) { |
+ if (!FLAG_support_service) { |
+ return; |
+ } |
JSONObject jsobj(js); |
jsobj.AddProperty("type", "FlagList"); |
JSONArray jsarr(&jsobj, "flags"); |