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

Unified Diff: runtime/vm/object.cc

Issue 2511543002: Add missing canonicalization of cloned uninstantiated types when cloning (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 2d92205554635666901ee1a3882c8cc812ab28f3..1077fde2e2f563b76426394b425226870a1ec656 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -16946,6 +16946,7 @@ RawAbstractType* Type::CloneUnfinalized() const {
RawAbstractType* Type::CloneUninstantiated(const Class& new_owner,
TrailPtr trail) const {
ASSERT(IsFinalized());
+ ASSERT(IsCanonical());
ASSERT(!IsMalformed());
if (IsInstantiated()) {
return raw();
@@ -17017,6 +17018,7 @@ RawAbstractType* Type::CloneUninstantiated(const Class& new_owner,
clone.set_arguments(type_args);
}
clone.SetIsFinalized();
+ clone ^= clone.Canonicalize();
return clone.raw();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698