Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Unified Diff: runtime/vm/isolate_reload.cc

Issue 2925303002: [hot reload] Ensure old class table is also freed on success. (Closed)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate_reload.cc
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 414d09381d200b545b70c0a38051459728be7825..76882ec991a6018831d7ece9a27b9375b4425567 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -473,7 +473,9 @@ IsolateReloadContext::IsolateReloadContext(Isolate* isolate, JSONStream* js)
}
-IsolateReloadContext::~IsolateReloadContext() {}
+IsolateReloadContext::~IsolateReloadContext() {
+ ASSERT(saved_class_table_ == NULL);
+}
void IsolateReloadContext::ReportError(const Error& error) {
@@ -1149,6 +1151,9 @@ void IsolateReloadContext::Commit() {
if (HasInstanceMorphers()) {
// Perform shape shifting of instances if necessary.
MorphInstances();
+ } else {
+ free(saved_class_table_);
+ saved_class_table_ = NULL;
}
#ifdef DEBUG
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698