Index: runtime/vm/isolate.cc |
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
index c883ea52094c8e64f43a0cf4fb65cd2c87f5bac8..eee6d049a5dfdf039ba1fcd1549e764968d2b206 100644 |
--- a/runtime/vm/isolate.cc |
+++ b/runtime/vm/isolate.cc |
@@ -55,6 +55,7 @@ DECLARE_FLAG(bool, timing); |
DECLARE_FLAG(bool, trace_service); |
DECLARE_FLAG(bool, trace_reload); |
DECLARE_FLAG(bool, warn_on_pause_with_no_debugger); |
+DECLARE_FLAG(bool, check_reloaded); |
NOT_IN_PRODUCT( |
static void CheckedModeHandler(bool value) { |
@@ -1696,6 +1697,15 @@ void Isolate::Shutdown() { |
} |
} |
+ if (FLAG_check_reloaded && |
+ (this != Dart::vm_isolate()) && |
+ !ServiceIsolate::IsServiceIsolateDescendant(this)) { |
+ if (!HasAttemptedReload()) { |
+ FATAL("Isolate did not reload before exiting and " |
+ "--check-reloaded is enabled.\n"); |
+ } |
+ } |
+ |
// Then, proceed with low-level teardown. |
LowLevelShutdown(); |