Index: runtime/vm/scavenger.cc |
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc |
index 5dc0aae609ee1ac723c0c291b762ee94ef073035..bcbb79fed277ad6b27f8bd696e31a73892e22447 100644 |
--- a/runtime/vm/scavenger.cc |
+++ b/runtime/vm/scavenger.cc |
@@ -546,6 +546,9 @@ void Scavenger::IterateStoreBuffers(Isolate* isolate, |
void Scavenger::IterateObjectIdTable(Isolate* isolate, |
ScavengerVisitor* visitor) { |
+ if (!FLAG_support_service) { |
+ return; |
+ } |
ObjectIdRing* ring = isolate->object_id_ring(); |
if (ring == NULL) { |
// --gc_at_alloc can get us here before the ring has been initialized. |
@@ -834,6 +837,9 @@ void Scavenger::WriteProtect(bool read_only) { |
void Scavenger::PrintToJSONObject(JSONObject* object) const { |
+ if (!FLAG_support_service) { |
+ return; |
+ } |
Isolate* isolate = Isolate::Current(); |
ASSERT(isolate != NULL); |
JSONObject space(object, "new"); |