Index: runtime/vm/object_reload.cc |
diff --git a/runtime/vm/object_reload.cc b/runtime/vm/object_reload.cc |
index dd15a1f80c3ee74681469094f2b0d5452dea6ff6..f3b06e0da26669dc82984adeb761b7dabc6f1db6 100644 |
--- a/runtime/vm/object_reload.cc |
+++ b/runtime/vm/object_reload.cc |
@@ -392,6 +392,9 @@ void Class::MigrateImplicitStaticClosures(IsolateReloadContext* irc, |
old_closure = old_func.ImplicitStaticClosure(); |
new_func = new_func.ImplicitClosureFunction(); |
new_closure = new_func.ImplicitStaticClosure(); |
+ if (old_closure.IsCanonical()) { |
+ new_closure.SetCanonical(); |
+ } |
irc->AddBecomeMapping(old_closure, new_closure); |
} |
} |