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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 2966583002: Mark class as typedef class before parsing its function type when using the new (Closed)
Patch Set: work in progress 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 | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 8032697f96fa1cda5a2bab486c282f73cc23bca6..1db6629772b285c9dd4c0405e3d57021a52ef494 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -2510,6 +2510,7 @@ void ClassFinalizer::FinalizeTypesInClass(const Class& cls) {
Function& signature = Function::Handle(cls.signature_function());
Type& type = Type::Handle(signature.SignatureType());
ASSERT(type.signature() == signature.raw());
+ ASSERT(type.type_class() == cls.raw());
// Check for illegal self references.
GrowableArray<intptr_t> visited_aliases;
@@ -2527,6 +2528,7 @@ void ClassFinalizer::FinalizeTypesInClass(const Class& cls) {
// Resolve and finalize the signature type of this typedef.
type ^= FinalizeType(cls, type);
+ ASSERT(type.type_class() == cls.raw());
// If a different canonical signature type is returned, update the signature
// function of the typedef.
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698