Index: runtime/vm/port.cc |
diff --git a/runtime/vm/port.cc b/runtime/vm/port.cc |
index 3451ec6b34995197f24c9218e33e557911cf7536..6af2ff82ca7be0f3db99951d71019d25f74b43dc 100644 |
--- a/runtime/vm/port.cc |
+++ b/runtime/vm/port.cc |
@@ -305,6 +305,9 @@ void PortMap::InitOnce() { |
void PortMap::PrintPortsForMessageHandler(MessageHandler* handler, |
JSONStream* stream) { |
+ if (!FLAG_support_service) { |
+ return; |
+ } |
JSONObject jsobj(stream); |
jsobj.AddProperty("type", "_Ports"); |
Object& msg_handler = Object::Handle(); |