Index: runtime/vm/pages.cc |
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc |
index 9c0352fe274a161ecbc4babb9878833e327df766..e5d1e65f0839aae645ed145b6557025dc43b69c5 100644 |
--- a/runtime/vm/pages.cc |
+++ b/runtime/vm/pages.cc |
@@ -844,7 +844,9 @@ void PageSpace::MarkSweep(bool invoke_api_callbacks) { |
SpaceUsage usage_before = GetCurrentUsage(); |
// Mark all reachable old-gen objects. |
- bool collect_code = FLAG_collect_code && ShouldCollectCode(); |
+ bool collect_code = FLAG_collect_code && |
+ ShouldCollectCode() && |
+ !isolate->HasAttemptedReload(); |
GCMarker marker(heap_); |
marker.MarkObjects(isolate, this, invoke_api_callbacks, collect_code); |
usage_.used_in_words = marker.marked_words(); |