Index: runtime/vm/isolate.cc |
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
index 0b8b5bbf0c4bd1e93527e4d91f9baf16ecf99222..c20def45467837153a63515762f8a6c5f22139bb 100644 |
--- a/runtime/vm/isolate.cc |
+++ b/runtime/vm/isolate.cc |
@@ -1095,8 +1095,6 @@ void Isolate::ReloadSources(bool test_mode) { |
has_attempted_reload_ = true; |
reload_context_ = new IsolateReloadContext(this, test_mode); |
reload_context_->StartReload(); |
- delete reload_context_; |
- reload_context_ = NULL; |
} |
#endif // !PRODUCT |
@@ -1117,6 +1115,8 @@ void Isolate::DoneFinalizing() { |
if (!reload_context_->has_error()) { |
reload_context_->ReportSuccess(); |
} |
+ delete reload_context_; |
+ reload_context_ = NULL; |
} |
) |
} |